Python implementation of the NSV (Newline-Separated Values) format
Project description
NSV Python
Python implementation of the NSV (Newline-Separated Values) format.
Installation
From PyPI
pip install nsv
From Source
git clone https://github.com/namingbe/nsv-python.git
cd nsv-python
pip install -e .
Usage
Basic Reading and Writing
import nsv
# Reading NSV data
with open('input.nsv', 'r') as f:
reader = nsv.load(f)
for row in reader:
print(row)
# Writing NSV data
with open('output.nsv', 'w') as f:
writer = nsv.Writer(f)
writer.write_row(['row1cell1', 'row1cell2', 'row1cell3'])
writer.write_row(['row2cell1', 'row2cell2', 'row2cell3'])
Development
Running Tests
Important: Always run tests from the project root to test local code changes (not the installed package):
python -m unittest discover -s tests -p 'test*.py' -v
Alternatively, install in editable mode:
pip install -e .
Must cover
loads(s)vsload(StringIO(s))paritydumps(data)vsdump(data, StringIO()).getvalue()parity
Features
- Core parsing
-
table
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
nsv-0.2.2.tar.gz
(11.6 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
nsv-0.2.2-py3-none-any.whl
(15.3 kB
view details)
File details
Details for the file nsv-0.2.2.tar.gz.
File metadata
- Download URL: nsv-0.2.2.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d8907411810fc63d37dcae03d917189484ba75d0bd1e9df71f9ba914a114661
|
|
| MD5 |
e41a56124846a1e6f1227f4922ee8737
|
|
| BLAKE2b-256 |
3fb496ea58e1352344968ea93e3e7ae878d646b70d8256bb288ad3ec8fffeb13
|
File details
Details for the file nsv-0.2.2-py3-none-any.whl.
File metadata
- Download URL: nsv-0.2.2-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69bf82c5575c18bf731c65e3342330f1afe5ad3338f0296c9a685d15ceb0bec0
|
|
| MD5 |
dafca1105fef4b7e70dcb4b211f570d7
|
|
| BLAKE2b-256 |
542511e8777ba43c43281b4aa63a9226585079bbc42c6ab6ace7b29ae212bdf3
|