ZOON Python
ZOON - Zero Overhead Object Notation
A Python implementation of the ZOON format for LLM context optimization. Achieves ~60% token reduction compared to JSON while maintaining 100% data fidelity.
Installation
pip install zoon-format
Or with uv:
uv add zoon-format
Quick Start
import zoon
data = [
{"id": 1, "name": "Alice", "role": "admin", "active": True},
{"id": 2, "name": "Bob", "role": "user", "active": True},
{"id": 3, "name": "Carol", "role": "user", "active": False},
]
encoded = zoon.encode(data)
print(encoded)
# # id:i+ name:s role=admin|user active:b
# Alice admin 1
# Bob user 1
# Carol user 0
decoded = zoon.decode(encoded)
assert decoded == data
Features
- ~60% Token Reduction: Reduced LLM context usage vs JSON
- 100% Lossless: Perfect round-trip encoding/decoding
- Type-Safe: Preserves integers, floats, booleans, nulls, and strings
- Auto-Increment IDs:
i+columns are omitted from data rows - Smart Enums: Automatic header-based typing for repeated values
API Reference
zoon.encode(data: Any) -> str
Encode Python data to ZOON format.
zoon.decode(zoon_string: str) -> Any
Decode ZOON string back to Python data.
License
MIT License. © 2025-PRESENT Carsen Klock
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zoon_format-1.0.3.tar.gz
(41.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zoon_format-1.0.3.tar.gz.
File metadata
- Download URL: zoon_format-1.0.3.tar.gz
- Upload date:
- Size: 41.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb68fb33ee42cb71e515c94dd9187bdeea82c454e4b8dfb8df64069795d30492
|
|
| MD5 |
894b57c64012c2f43f8b0db19c773db2
|
|
| BLAKE2b-256 |
06d13eb63044d3f6bc5a7a7ca735492bab26ca2aa9c3a34908c3f5d65b5c75e7
|
File details
Details for the file zoon_format-1.0.3-py3-none-any.whl.
File metadata
- Download URL: zoon_format-1.0.3-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6c03ef7a0408a6ed9e3e1ffd1ac48c39b073df005473a65b92990bae837ecd7
|
|
| MD5 |
d24a5c75f2b6c119da72563ea7e239bb
|
|
| BLAKE2b-256 |
204e70a55d77c79f26f0d0db7faaf469ed933def9a0f46947e73e5fef4b6f210
|