xaviviro/python-toon

🐍 TOON for Python (Token-Oriented Object Notation) Encoder/Decoder - Reduce LLM token costs by 30-60% with structured data.

52
/ 100
Established

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.

LLM-cost-optimization prompt-engineering AI-application-development data-transmission
Maintenance 6 / 25
Adoption 14 / 25
Maturity 22 / 25
Community 10 / 25

How are scores calculated?

Stars

331

Forks

12

Language

Python

License

MIT

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.