A Python library for converting to and from TONL (Token-Optimized Notation Language)
Project description
TONL Converter
A Python library for converting to and from TONL (Token-Optimized Notation Language).
Features
- Convert JSON, YAML, and Markdown tables to TONL.
- Convert TONL to JSON, YAML, and Markdown.
- CLI tool for easy file conversion.
- Token-optimized output format.
Installation
pip install tonl-converter
Usage
CLI
# Convert JSON to TONL
tonl input.json output.tonl
# Convert TONL to JSON
tonl input.tonl output.json
# Convert to Markdown table
tonl data.tonl report.md
Python API
from tonl import load, dump, to_json, from_json
# Load TONL file
with open('data.tonl', 'r') as f:
data = load(f)
# Convert to JSON
json_str = to_json(data)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tonl_converter-0.1.0.tar.gz
(6.4 kB
view details)
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 tonl_converter-0.1.0.tar.gz.
File metadata
- Download URL: tonl_converter-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1823b4e69b3d355fd9c98bb0e76057be04669330fd43b91c5a64184d6f5ca8af
|
|
| MD5 |
7d963d1d7977708df8f37394fd8e8a67
|
|
| BLAKE2b-256 |
4a5f8e4a68d9748b70143c6d48392608645f8341d5328fe437e1c990473970bc
|
File details
Details for the file tonl_converter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tonl_converter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a7db76bbf4d8b4bbe33f65087097f55684949189a85a8be8274bc491d8bcba7
|
|
| MD5 |
3eae7ec4f74bee9e1a12f1d4405e6227
|
|
| BLAKE2b-256 |
1d8e07822045beead357a738c9518633261477ca8a84a11d4e65afb3ce94685b
|