TTOON — cross-language typed text data exchange for T-TOON and T-JSON with Arrow support
Project description
ttoon
ttoon is the Python SDK for TTOON.
Features
T-TOONandT-JSONserialization and parsing- Conversion between Python values and typed values
- Arrow-based workflows for
pyarrowandpolars
Installation
pip install ttoon
Quick Example
import ttoon
text = ttoon.dumps({"name": "Alice", "score": 95})
data = ttoon.loads(text)
typed_json = ttoon.to_tjson({"name": "Alice"})
fmt = ttoon.detect_format(text)
Arrow Example
import polars as pl
import ttoon
df = pl.DataFrame({"name": ["Alice", "Bob"], "score": [95, 87]})
text = ttoon.dumps(df)
table = ttoon.read_arrow(text)
Notes
dumps()accepts standard Python objects as well aspolars.DataFrame,pyarrow.Table, andpyarrow.RecordBatch.read_arrow()returns apyarrow.Table.loads()automatically detectsT-TOON,T-JSON, andtyped_unitinputs.
See docs/public/en/ for guides and API reference material.
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
ttoon-0.1.0.tar.gz
(90.5 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 ttoon-0.1.0.tar.gz.
File metadata
- Download URL: ttoon-0.1.0.tar.gz
- Upload date:
- Size: 90.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d57b0be70a20677c799fa0621963d8be12d85b181117e77ea4daafe9fe44b64
|
|
| MD5 |
a724483f9fe068f9a923ac4cbf4027d7
|
|
| BLAKE2b-256 |
f4937663d5442264b4330ed0e003230240ab7609cc6b45e1695f3a9e36b984c9
|
File details
Details for the file ttoon-0.1.0-cp311-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ttoon-0.1.0-cp311-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.11+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e8f2d99889851065c5a4d1bd0d37d2af3397743a10897426d26a034f357bdf6
|
|
| MD5 |
c4fbab33297ec0e3dcd43c2f03f8c605
|
|
| BLAKE2b-256 |
e44282eefbfb2b5b18f50da626945566525547f66dbe5b2bb5c06806bb4894da
|