Skip to main content

Helper library to parse Toon files.

Project description

Toon Escape

Lightweight helper library to parse "Toon" JSON structures into a readable text format.

Requirements

Quick install (local)

Install editable for development:

pip install -e .

Or install normally:

pip install .

The project exposes a console entry point configured in pyproject.toml (script name: toonparser).

Usage

Programmatic:

# python
from ToonEscape.ToonParser import ToonParser

parser = ToonParser()

# json_data can be a file path, a dict, or a JSON string
result = parser.parseToon({
    "name": "Example",
    "teams": [{"id": 1, "name": "Alpha"}, {"id": 2, "name": "Beta"}]
})

print(result)

Refer to the implementation in ToonEscape.ToonParser.ToonParser.parseToon for details on accepted inputs and output formatting.

CLI

After installation, the console script toonparser (configured in pyproject.toml) can be used if the package is installed as a wheel or editable install. Behavior and arguments mirror the library's input types (file path / JSON string / dict when used programmatically).

Development

Notes

  • The parser focuses on rendering nested JSON structures into a concise, human-readable representation.
  • For input rules and behavior see ToonEscape.ToonParser.ToonParser.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toon_escape-0.1.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toon_escape-0.1.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file toon_escape-0.1.3.tar.gz.

File metadata

  • Download URL: toon_escape-0.1.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for toon_escape-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ad82a50cc2e56436b396c5029f732a67c0e1670a8421f8ca8e7c9b2884471a36
MD5 3f7f51cefd3b4cf541a7584fd011eabb
BLAKE2b-256 81f8b3112a923a09fed526fed98a1b9912f70d0ba6baef19c033cf5e56d4e33b

See more details on using hashes here.

File details

Details for the file toon_escape-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for toon_escape-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d6e4c58347a01ce421f58a891dbdbc08a7ca0d7ff1502a49eeac3ce389a593b6
MD5 815193ae990b734e8fce67b2307daf2c
BLAKE2b-256 8a4b487a6aa815cfd57e1e0e8c807062725f13f058f23f45834fbbea45873eeb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page