alesanfra/toons
A high-performance TOON (Token Oriented Object Notation) parser and serializer for Python.
This tool helps developers working with Large Language Models (LLMs) to reduce the token count of data exchanged with these models. It takes standard Python data structures or TOON-formatted strings/files as input and outputs the equivalent in the token-efficient TOON format, or converts TOON back to Python data structures. Developers building LLM applications, especially those sensitive to token costs and context window limits, would use this.
Available on PyPI.
Use this if you are a Python developer needing to serialize or deserialize data for Large Language Models and want to significantly reduce token usage and associated costs compared to JSON.
Not ideal if your primary concern is human readability over token efficiency, or if your application does not involve Large Language Models and their token limitations.
Stars
11
Forks
1
Language
Rust
License
Apache-2.0
Category
Last pushed
Feb 23, 2026
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/transformers/alesanfra/toons"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Compare
Higher-rated alternatives
xaviviro/python-toon
🐍 TOON for Python (Token-Oriented Object Notation) Encoder/Decoder - Reduce LLM token costs by...
ScrapeGraphAI/toonify
Toonify: Compact data format reducing LLM token usage by 30-60%
dagoSte/aton-format
ATON Format - Python implementation. Token-efficient data serialization for LLM applications.