Python support for linear TSV files
Project description
Python support for linear TSV files
Free software: MIT license
What is Linear TSV
In contrast to Excel’s TSV dialect, linear TSV is line-based.
“But hey”, I hear you say, “isn’t TSV always line-based?”. Well, the issue arises when a cell contains a tab or newline character. In excel’s TSV format, that cell is surrounded by quotes and the entry is continued on the next line. Now you have:
entries spanning several lines
quotes that need to be ignored (”)
quotes that are escaped by doubling them (“”)
All of this can be prevented if you simply:
escape tabs: t
escape newlines: n
escape carriage returns: r
escape backslashes: \
That’s linear tsv in a nutshell.
Installation
pip install tsv2dict
You can also install the in-development version with:
pip install https://github.com/nkurmann/tsv2dict/archive/master.zip
Documentation
Development
To run all the tests run:
tox
Note, to combine the coverage data from all the tox environments run:
Windows |
set PYTEST_ADDOPTS=--cov-append tox |
---|---|
Other |
PYTEST_ADDOPTS=--cov-append tox |
Changelog
0.0.0 (2021-02-28)
First release on PyPI.
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
Built Distribution
Hashes for tsv2dict-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 021d4ec4fc1d9c0e52127c08c3d6ae69f47a53bb9590ce144b1e9ecc9428a106 |
|
MD5 | 70ad3951c85ed833da20a35b30c5e996 |
|
BLAKE2b-256 | a65c7839f7d62e46217492f309fb6cfbb14113c4abf8d8d19ef60708bdf7291d |