Skip to main content

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'])

Running Tests

cd tests
python -m unittest

Must cover

  • loads(s) vs load(StringIO(s)) parity
  • dumps(data) vs dump(data, StringIO()).getvalue() parity

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.1.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nsv-0.1.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file nsv-0.1.0.tar.gz.

File metadata

  • Download URL: nsv-0.1.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for nsv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e57aa9f90432b0fc61e572176b0a74af9eb6dd4d8ec391935cb7b5978ea16604
MD5 f890986a56192159ad0ae7410f8592f9
BLAKE2b-256 2af4df0fc86f378f219846f2c09a92f10027b7533f8fcf2043364a86e35c0c5c

See more details on using hashes here.

File details

Details for the file nsv-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nsv-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for nsv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82fe0ee864028450bf2bd3f647f641a8bb0c22ec12ebbbbadace0e5d89d4533f
MD5 c1f44abc6bcf109b58beb8782346e5cc
BLAKE2b-256 6b12b4124b49910d2ce5654b6ec04161901ded66b9b19bf7b1e8e8f183d4cd40

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page