Releases: xaviviro/python-toon
Releases · xaviviro/python-toon
v0.1.3
Release Notes - v0.1.3
Overview
This release adds support for the uv package manager and aligns the project with the official TOON format specification and organization.
New Features
- uv Support: Added full support for
uvpackage manager with setup instructions in README and CONTRIBUTING guides - Development Tooling:
.editorconfigfor consistent code formatting across editors.python-versionfile specifying Python 3.14CONTRIBUTING.mdwith comprehensive contributor guidelinesCODE_OF_CONDUCT.md(Contributor Covenant 3.0)
Changes
- Specification Alignment: Updated all references to point to the official toon-format/spec repository
- Documentation Updates:
- README now includes both
uv(recommended) andpipinstallation methods - CLAUDE.md updated with official spec compliance guidelines
- Simplified credits and references sections
- README now includes both
- Configuration:
- Changed
dependency-groupstoproject.optional-dependenciesfor better compatibility with pip and uv - Updated
.gitignorewith uv-related entries (.uv/,uv.lock) - Documentation URL now points to official TOON spec
- Changed
Testing
- All 73 tests passing
- 75% code coverage maintained
Installation
With uv (recommended)
uv pip install python-toon
With pip
pip install python-toon
Development Setup
With uv
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"
With pip
python -m venv venv
source venv/bin/activate
pip install -e .
pip install -r requirements-dev.txt
Links
PyPI: https://pypi.org/project/python-toon/
Repository: https://github.com/xaviviro/python-toon
Official TOON Spec: https://github.com/toon-format/specv0.1.2
🎉 Full Decoder & CLI Support
This release adds complete bidirectional TOON encoding/decoding capabilities and a powerful command-line interface.
✨ New Features
🔄 TOON Decoder
- Full parser implementation following TOON v1.2 specification
- Support for all TOON formats:
- Primitives (strings, numbers, booleans, null)
- Objects (nested and flat)
- Inline arrays (
tags[3]: a,b,c) - Tabular arrays (
items[2,]{id,name}: ...) - List arrays (mixed/non-uniform)
- Arrays of arrays
- Delimiter support: comma, tab (
\t), and pipe (|) - Length markers: Support for
#prefix (e.g.,[#3]) - Strict & non-strict modes: Configurable validation
- Proper escape handling:
\\,\",\n,\r,\t
🖥️ Command-Line Interface
# Encode JSON to TOON
toon input.json -o output.toon
# Decode TOON to JSON
toon data.toon -o output.json
# Pipe support
echo '{"name": "Ada"}' | toon -
# Custom options
toon data.json --delimiter "\t" --length-marker -o output.toon
CLI Features:
✅ Auto-detection based on file extension
✅ Content-based fallback detection
✅ Stdin/stdout support for piping
✅ All encoding/decoding options as flags
✅ Force encode/decode modes
📦 API Changes
New Functions
from toon import decode, DecodeOptions, ToonDecodeError
# Decode TOON string to Python values
data = decode(toon_str)
# With options
options = DecodeOptions(indent=2, strict=True)
data = decode(toon_str, options)v0.1.1
Aligns with TOON v0.4.1 SPEC v1.1
v0.1.0
Full Changelog: https://github.com/xaviviro/python-toon/commits/v0.1.0