typeline
Write dataclasses to delimited text formats and read them back again.
Features type-safe parsing, optional field support, and an intuitive API for working with structured data.
Installation
The package can be installed with pip:
pip install typeline
Quickstart
Building a Test Dataclass
>>> from dataclasses import dataclass
>>>
>>> @dataclass
... class MyData:
... field1: int
... field2: str
... field3: float | None
Writing
>>> from tempfile import NamedTemporaryFile
>>> from typeline import TsvWriter
>>>
>>> temp_file = NamedTemporaryFile(mode="w+t", suffix=".tsv")
>>>
>>> with TsvWriter.from_path(temp_file.name, MyData) as writer:
... writer.write_header()
... writer.write(MyData(10, "test1", 0.2))
... writer.write(MyData(20, "test2", None))
Reading
>>> from typeline import TsvReader
>>>
>>> with TsvReader.from_path(temp_file.name, MyData) as reader:
... for record in reader:
... print(record)
MyData(field1=10, field2='test1', field3=0.2)
MyData(field1=20, field2='test2', field3=None)
Development and Testing
See the contributing guide for more information.
Metadata
Release files for typeline 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| typeline-0.12.0.tar.gz | 8.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| typeline-0.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.1 kB
Release files / typeline-0.12.0.tar.gz
| Download URL | typeline-0.12.0.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab569abefd6f9a5cc8eb40dbc8cc62187c8610fd540b4679d201d50f14d2656a
|
|
BLAKE2b-256 checksum How to use checksums |
3dfd20cd09a05daf273283431f117e4e2a2e33a7d488bec65d7997085dfb45cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / typeline-0.12.0-py3-none-any.whl
| Download URL | typeline-0.12.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
320c50dae188e671dbcfea7a0b88004add0ec86b0fdc30a5f071467e607918e4
|
|
BLAKE2b-256 checksum How to use checksums |
7baf0869147278faa262c23a2149530f5e909d8c7d37f0607dd2b3984d8dde8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency log