Registry / serialization / tsv2py

tsv2py

JSON →
library0.7.1pypypi✓ verified 81d ago

High-performance parser and generator for PostgreSQL-compatible tab-separated values (TSV). Current version 0.7.1, requires Python >=3.8. Release cadence is irregular (last release 2025-01).

pip install tsv2py
INSTALL
IMPORT
SIG · TSV2PY
T
tsv2py
serializationpythonv0.7.1
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.7.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tsv
import tsv
import tsv2py

Parse TSV data from string and generate TSV output.

import tsv2py # Parse TSV string data = "col1\tcol2\n1\t2" for row in tsv2py.TsvParser(data): print(row) # Generate TSV string g = tsv2py.TsvGenerator() g.append(["a", "b"]) print(g.finish())
tsv2py --version
Debug
Known issues
breakingIn version 0.7.0, the API changed from classes like TsvReader to TsvParser and TsvGenerator. Old code using TsvReader will break.
fix
Replace TsvReader with TsvParser and adapt interface (e.g., rows via iteration).
affects: <0.7.0
deprecatedThe option to read TSV from file paths directly in the constructor was deprecated; use file-like objects.
fix
Use open(filename, 'r') to create a file object and pass it to TsvParser.
affects: >=0.7.0
gotchaTsvParser expects TSV data as string or file object, not a file path. Passing a path will raise TypeError.
fix
Always open file first: with open(path) as f: TsvParser(f).
affects: all
Upgrade
Version history
0.7.1latest on PyPI · released Sep 12, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
24 hits · last 30 days
node
22
Amazon
1
OpenAI (training)
1
Resources
tsv2py — pip install tsv2py · libregistry