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/nsv-format/nsv-python.git
cd nsv-python
pip install -e .

Usage

Basic Reading and Writing

import nsv

with open('input.nsv', 'r') as f:
    # load/dump are non-resumable
    reader = nsv.load(f)
    for row in reader:
        print(row)

with open('output.nsv', 'w') as f:
    # Reader/Writer are resumable, intended for streaming
    writer = nsv.Writer(f)
    writer.write_row(['row1cell1', 'row1cell2', 'row1cell3'])
    writer.write_row(['row2cell1', 'row2cell2', 'row2cell3'])

Vendor

The core NSV format is frozen by-design.
Unless you rely on ENSV features or are performance-aware, copying the naive implementation directly to your codebase may be the better way to handle NSV files.
Controllable code, controllable interfaces, zero chance of a supply-chain attack.

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.3.tar.gz (16.4 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.2.3-cp314-cp314-macosx_15_0_arm64.whl (20.4 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

File details

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

File metadata

  • Download URL: nsv-0.2.3.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for nsv-0.2.3.tar.gz
Algorithm Hash digest
SHA256 e7b231ea49e9da5bab72eff168cfe43b2d7a96ed0d5db4a525d621eaf2d18ea6
MD5 a15305d300681209ee235c083c680d9c
BLAKE2b-256 2f583cc36c8ada574879083ba076512e0e0e424b5eb3dd66c98006df3a4ad3a3

See more details on using hashes here.

File details

Details for the file nsv-0.2.3-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

  • Download URL: nsv-0.2.3-cp314-cp314-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: CPython 3.14, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for nsv-0.2.3-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7550084cb993ac5233885398f04249cedd22e48d651444a397f9fc71bf1f4a0a
MD5 9b384a4a96a2548f7af9d4e04914a7f4
BLAKE2b-256 f6e07bab0f1f744709cbcbb3772054962f05e766f8d9858efc19b6a27a0ccfd6

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