Python implementation of the NSV (Newline-Separated Values) format.
pip install nsv
git clone https://github.com/namingbe/nsv-python.git
cd nsv-python
pip install -e .
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'])
cd tests
python -m unittest
Must cover
loads(s)
vsload(StringIO(s))
paritydumps(data)
vsdump(data, StringIO()).getvalue()
parity
- Core parsing
-
table