Skip to main content

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-TOON and T-JSON serialization and parsing
  • Conversion between Python values and typed values
  • Arrow-based workflows for pyarrow and polars

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 as polars.DataFrame, pyarrow.Table, and pyarrow.RecordBatch.
  • read_arrow() returns a pyarrow.Table.
  • loads() automatically detects T-TOON, T-JSON, and typed_unit inputs.

See docs/public/en/ for guides and API reference material.

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

ttoon-0.1.0.tar.gz (90.5 kB view details)

Uploaded Source

Built Distribution

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

ttoon-0.1.0-cp311-abi3-manylinux_2_34_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.34+ x86-64

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

Hashes for ttoon-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7d57b0be70a20677c799fa0621963d8be12d85b181117e77ea4daafe9fe44b64
MD5 a724483f9fe068f9a923ac4cbf4027d7
BLAKE2b-256 f4937663d5442264b4330ed0e003230240ab7609cc6b45e1695f3a9e36b984c9

See more details on using hashes here.

File details

Details for the file ttoon-0.1.0-cp311-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ttoon-0.1.0-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3e8f2d99889851065c5a4d1bd0d37d2af3397743a10897426d26a034f357bdf6
MD5 c4fbab33297ec0e3dcd43c2f03f8c605
BLAKE2b-256 e44282eefbfb2b5b18f50da626945566525547f66dbe5b2bb5c06806bb4894da

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