Skip to main content

soon-format

SOON (Shape-Oriented Object Notation) — lossless, token-efficient encoding of nested JSON for LLM prompts. Python implementation.

Install

pip install soon-format            # library + `soon` CLI
pip install "soon-format[tokens]"  # + tiktoken-based cost decisions

Usage

from soon_format import encode, decode, stats

doc = encode(data)                        # auto mode, never-worse guarantee
data == decode(doc)                       # True — lossless
stats(data)                               # {"json_chars": …, "soon_chars": …, "saving": 0.604}

# Real-token cost decisions
encode(data, tokenizer="o200k_base")
stats(data, tokenizer="o200k_base")       # adds json_tokens / soon_tokens

CLI

soon encode data.json --stats
soon decode doc.soon              # compact JSON to stdout
soon decode doc.soon --pretty     # indented JSON
soon check data.json              # round-trip verification

Spec & conformance

This implementation passes the shared conformance suite byte-for-byte. See the SOON spec for the normative format definition.

License

MIT © Yasin Ughur

Metadata

Release files for soon-format 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for soon-format 0.1.0
File Size Uploaded
soon_format-0.1.0.tar.gz 3.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for soon-format 0.1.0
File Interpreter ABI Platform
soon_format-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.3 MB

Release files / soon_format-0.1.0.tar.gz

Download URL soon_format-0.1.0.tar.gz
Size 3.6 MB
Tags Source
SHA-256 checksum
How to use checksums
dcf79e467093b16479f77bf52d1b04f84132be8068e8a373bc09a93e22af9d31
BLAKE2b-256 checksum
How to use checksums
c2494d88081b618f70aa7464dcf6fd6b824e9ef1876dc90d42366892743413e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / soon_format-0.1.0-py3-none-any.whl

Download URL soon_format-0.1.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e8bc0830600a466f53b13228ec873b5c9ac6ec6bcd975c7f587cb543e6d552eb
BLAKE2b-256 checksum
How to use checksums
99130843870b6943a7ec812022199b460f42853caa0ca8007310f5bd3ca7cfc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page