Skip to main content

Read and write Dataset-JSON as NDJSON

Project description

ndjsonlib

Introduction

under development

The ndjsonlib module provides an interface to read and write Dataset-JSON as NDJSON. It can convert to and from the JSON format of Dataset-JSON. It also supports storing NDJSON metadata and data as separate files and combining them for data exchange. Maintaining the metadata in a separate file makes it simple to update the datasetJsonCreationDatetime and the records attributes without requiring an application to re-write the entire file.

The ndjsonlib module was initiated to support a POC implementation of a draft Dataset-JSON API standard. The ndjsonlib module remains under development and its API will evolve.

Basic Structure and Interfaces

  • dataset_name.py: Given the dataset name and the directory, the DatasetName class provides the file names needed for the metadata and data parts of the NDJSON dataset.
  • data_file.py: The DataFile class provides methods for reading and writing the NDJSON data file
  • metadata_file.py: The MetadataFile class provides methods for reading and writing the NDJSON metadata file
  • json_data_file.py: The JsonDataFile class returns JSON by reading the NDJSON files and writes NDJSON given a JSON dataset. Basically, this class uses NDJSON as a data store for JSON inputs and outputs.
  • ndjson_data_file.py: The NdjsonDataFile reads and writes NDJSON datasets as one file.

Status

The ndjsonlib module has been updated to support Dataset-JSON v1.1 and is still under development. The ndjsonlib module was originally developed to support the Dataset-JSON API Proof-of-Concept.

TODO

  1. refine API / class interfaces
  2. complete documentation
  3. update tests

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

ndjsonlib-0.0.3.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

ndjsonlib-0.0.3-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file ndjsonlib-0.0.3.tar.gz.

File metadata

  • Download URL: ndjsonlib-0.0.3.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for ndjsonlib-0.0.3.tar.gz
Algorithm Hash digest
SHA256 49d8a49b50e1386c0480018208674657b8dd9bc38c0cd13f2dab502ef1e91d35
MD5 c343710386ce4d814306dc959f7afb36
BLAKE2b-256 c4f47f1617e6142840e23d339a68f4ddaa4548a8bc3ff6e4d22108ed9832c6d7

See more details on using hashes here.

File details

Details for the file ndjsonlib-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: ndjsonlib-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for ndjsonlib-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 737c23bfcd723cce8b8880f5322e7d79060a24d0e111d98f072ee17801d13196
MD5 f4d7a5c162a90f23ab10801585dc3ff4
BLAKE2b-256 03df7d977b5bba83d38b74cbaf83f6ab26e470784705a2a1ec38401c61070484

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