$npx skillfedfor your agent

python-toon

TOON (Token-Oriented Object Notation) encoder/decoder for Python - Bidirectional JSON-to-TOON converter optimized for LLMs

With conditionsPyPI Python ModulesReleased Nov 2025605.2K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — python_toon-0.1.3-py3-none-any.whl
v0.1.3 · released 2025-11-04 · Python >=3.8

Yes, if you are building LLM applications where token efficiency matters and you want a standards-compliant TOON implementation. The package is lightweight (no dependencies), well-documented, and covers both API and CLI use cases. The aging maintenance status (283 days since last commit) is a minor concern for a stable format encoder, but the unarchived repository and recent release history suggest it is not abandoned. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction: pure Python wheel with no runtime dependencies.
  • Maintenance status is aging—last commit was 283 days ago—but the repository remains active and unarchived with 340 stars.

License · maintenance · safety

MIT (permissive) — MIT license (permissive): you can use, modify, and distribute this package freely in commercial and private projects, with minimal restrictions.

last release 2025-11-04 (283 days) · last repo commit 2025-11-04 · 340 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 605,211 downloads/mo, #5,797 on PyPI

Verify before relying

pip install python-toon

from toon import encode, decode

data = {"name": "Alice", "age": 30}
toon_str = encode(data)
print(toon_str)  # name: Alice\nage: 30

recovered = decode(toon_str)
print(recovered)  # {'name': 'Alice', 'age': 30}
  • Whether the 30-60% token reduction claim has been independently validated against real LLM tokenizers.
  • Performance characteristics (encoding/decoding speed) on large datasets or deeply nested structures.
  • Compatibility guarantees with the official TypeScript TOON implementation beyond the stated 100% output compatibility.
Same gist for agents: .md · .json

What it is and what it does

python-toon is a bidirectional encoder/decoder for TOON, a data format that combines YAML-style indentation for nested objects with CSV-like tabular format for uniform arrays. It targets LLM token efficiency by eliminating redundant punctuation (braces, brackets, most quotes) while maintaining semantic clarity. The package provides both a Python API (encode/decode functions) and a command-line tool for converting between JSON and TOON formats.

The format supports nested objects, primitive arrays with length markers, tabular arrays (uniform object collections), and mixed arrays. It implements the official TOON specification with strict validation by default, optional lenient parsing, and configurable delimiters (comma, tab, pipe). Since its first release in October 2025, it has reached version 0.1.3 and supports Python 3.8 through 3.12.

Use it for

  • Prepare structured data for LLM prompts where token count directly affects API cost or response latency.
  • Convert existing JSON datasets to TOON format for more efficient LLM ingestion via CLI or programmatic API.
  • Encode tabular data (lists of uniform objects) into compact CSV-like TOON format for batch LLM processing.
  • Bidirectionally convert between JSON and TOON in data pipelines that feed language models.
  • Validate TOON-formatted input with strict mode or parse lenient TOON variants with relaxed validation.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are building LLM applications where token efficiency matters and you want a standards-compliant TOON implementation.

The package is lightweight (no dependencies), well-documented, and covers both API and CLI use cases. The aging maintenance status (283 days since last commit) is a minor concern for a stable format encoder, but the unarchived repository and recent release history suggest it is not abandoned. No known security vulnerabilities.

Install

python-toon on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Maintenance status is aging—last commit was 283 days ago—but the repository remains active and unarchived with 340 stars.

License in practice

MIT license (permissive): you can use, modify, and distribute this package freely in commercial and private projects, with minimal restrictions.

Quickstart

pip install python-toon

from toon import encode, decode

data = {"name": "Alice", "age": 30}
toon_str = encode(data)
print(toon_str)  # name: Alice\nage: 30

recovered = decode(toon_str)
print(recovered)  # {'name': 'Alice', 'age': 30}

Verify before relying

  • Whether the 30-60% token reduction claim has been independently validated against real LLM tokenizers.
  • Performance characteristics (encoding/decoding speed) on large datasets or deeply nested structures.
  • Compatibility guarantees with the official TypeScript TOON implementation beyond the stated 100% output compatibility.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 283 days since the last release
Last repo commit
First released
Downloads605,211 / month, #5,797 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Markup

Evidence: python_toon-0.1.3-py3-none-any.whl

Tags

Capabilities
token-efficient data formatJSON to TOON converterLLM-optimized encodingcompact structured data formatYAML-like object notationreduce tokens for LLMTOON encoder decoder
Topics
llm-optimizationdata-serializationtoken-efficiency
PyPI keywords
data-formatencodingllmtoken-efficienttoon

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “JSON to TOON converter”

  • python-toonEncodes and decodes TOON (Token-Oriented Object Notation), a compact…
  • toonstoons is a Rust-backed Python parser and serializer for the TOON…
  • toon-formatEncodes and decodes data structures using TOON (Token-Oriented Object…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also toon-format · toons · rison · prison · json-numpy · dataclasses-json-speakeasy · dataclasses-json · json-flatten · asn1 · sed4onnx