Helper library to parse Toon files.
Project description
Toon Escape
Lightweight helper library to parse "Toon" JSON structures into a readable text format.
- Package: pyproject.toml
- Main parser class:
ToonEscape.ToonParser.ToonParser(file) - Constants referenced:
ToonEscape.Constants.Constants(file)
Requirements
- Python >= 3.12 (see .python-version)
- Hatch-based build declared in pyproject.toml
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
- Run tests (if present) via your preferred test runner.
- Code is under
ToonEscape/. Main sources:- ToonEscape/ToonParser.py
- ToonEscape/Constants/Constants.py
- package entry file: init.py
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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad82a50cc2e56436b396c5029f732a67c0e1670a8421f8ca8e7c9b2884471a36
|
|
| MD5 |
3f7f51cefd3b4cf541a7584fd011eabb
|
|
| BLAKE2b-256 |
81f8b3112a923a09fed526fed98a1b9912f70d0ba6baef19c033cf5e56d4e33b
|
File details
Details for the file toon_escape-0.1.3-py3-none-any.whl.
File metadata
- Download URL: toon_escape-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6e4c58347a01ce421f58a891dbdbc08a7ca0d7ff1502a49eeac3ce389a593b6
|
|
| MD5 |
815193ae990b734e8fce67b2307daf2c
|
|
| BLAKE2b-256 |
8a4b487a6aa815cfd57e1e0e8c807062725f13f058f23f45834fbbea45873eeb
|