ZOON - Zero Overhead Object Notation for LLM context optimization
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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.1.tar.gz.
File metadata
- Download URL: zoon_format-1.0.1.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3e94a312ecd59f2c9f4aaee10ae6139d78c862f8d87730a2236d2d0a2603c54
|
|
| MD5 |
202af9ad4c0d134f07d73877f1eb37b7
|
|
| BLAKE2b-256 |
5bf5689c4d58377979bd8ebc94b3349a30017d1748534f9bde8de0996a145df4
|
File details
Details for the file zoon_format-1.0.1-py3-none-any.whl.
File metadata
- Download URL: zoon_format-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7f6d8a6342dec4e250dd15fc5877242d9d6b05823c4d06e4fe344abb7779032
|
|
| MD5 |
ba4f6bc015326381f4495441028cd96e
|
|
| BLAKE2b-256 |
5eefb8d9db3a9346c49681a4e43e71ae0dd958f36fdccafc4a96f49766524249
|