Skip to main content

Token-Oriented Object Notation – a token-efficient JSON alternative for LLM prompts

Project description

TOON Format for Python

PyPI version Python versions License: MIT

Token-Oriented Object Notation is a compact, human-readable format designed for passing structured data to Large Language Models with significantly reduced token usage.

Status

🚧 This package is currently a namespace reservation. Full implementation coming soon!

Example

JSON (verbose):

{
  "users": [
    { "id": 1, "name": "Alice", "role": "admin" },
    { "id": 2, "name": "Bob", "role": "user" }
  ]
}

TOON (compact):

users[2]{id,name,role}:
  1,Alice,admin
  2,Bob,user

Resources

Future Usage

Once implemented, the package will provide:

from toon_format import encode, decode

data = # your data structure
toon_string = encode(data)
decoded = decode(toon_string)

Contributing

Interested in implementing TOON for Python? Check out the specification and feel free to contribute!

License

MIT License © 2025-PRESENT Johann Schopplich

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toon_format-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toon_format-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file toon_format-0.1.0.tar.gz.

File metadata

  • Download URL: toon_format-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for toon_format-0.1.0.tar.gz
Algorithm Hash digest
SHA256 77303c9b06956fe8b0066d2bca52dfdc63e2b3abba439c3c3545dbbd43a97d48
MD5 649eddb0014eadef3184fa5c42116c3a
BLAKE2b-256 d45cf74ab4f7faaa00ffc0c13aea4acfdd5e1fdecf4a1e81196f39203e56dc10

See more details on using hashes here.

File details

Details for the file toon_format-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: toon_format-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for toon_format-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0c7bf3f63f1fc08739127ca895a55922617193f942f84474489770d7cd1ffc2
MD5 c1c19f481bfd434c77466f4c2fa2d251
BLAKE2b-256 eeaec52d28ce93490f82cfbbf49e1b9a85f33449c89fc1a5aa53d476d3a69666

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page