Skip to content

Releases: xaviviro/python-toon

v0.1.3

04 Nov 09:11

Choose a tag to compare

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 uv package manager with setup instructions in README and CONTRIBUTING guides
  • Development Tooling:
    • .editorconfig for consistent code formatting across editors
    • .python-version file specifying Python 3.14
    • CONTRIBUTING.md with comprehensive contributor guidelines
    • CODE_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) and pip installation methods
    • CLAUDE.md updated with official spec compliance guidelines
    • Simplified credits and references sections
  • Configuration:
    • Changed dependency-groups to project.optional-dependencies for better compatibility with pip and uv
    • Updated .gitignore with uv-related entries (.uv/, uv.lock)
    • Documentation URL now points to official TOON spec

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/spec

v0.1.2

30 Oct 16:19

Choose a tag to compare

🎉 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

30 Oct 04:33

Choose a tag to compare

Aligns with TOON v0.4.1 SPEC v1.1

v0.1.0

27 Oct 14:58

Choose a tag to compare