xaviviro/python-toon
🐍 TOON for Python (Token-Oriented Object Notation) Encoder/Decoder - Reduce LLM token costs by 30-60% with structured data.
This tool helps anyone working with Large Language Models (LLMs) significantly reduce their token usage and associated costs when sending structured data. It takes standard data formats like JSON and converts them into a compact "Token-Oriented Object Notation" (TOON), which is specifically optimized for LLM processing. This means you feed in your data, get back a much smaller representation, and then send that to your LLM.
331 stars. Used by 4 other packages. Available on PyPI.
Use this if you are frequently sending structured data (like user profiles, product catalogs, or API responses) to LLMs and want to cut down on token costs by 30-60%.
Not ideal if your primary goal is general-purpose data storage or exchange with systems that are not LLMs, as TOON is specialized for token efficiency.
Stars
331
Forks
12
Language
Python
License
MIT
Category
Last pushed
Nov 04, 2025
Commits (30d)
0
Reverse dependents
4
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/transformers/xaviviro/python-toon"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related models
ScrapeGraphAI/toonify
Toonify: Compact data format reducing LLM token usage by 30-60%
alesanfra/toons
A high-performance TOON (Token Oriented Object Notation) parser and serializer for Python.
dagoSte/aton-format
ATON Format - Python implementation. Token-efficient data serialization for LLM applications.