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.4.tar.gz (9.5 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.4-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ndjsonlib-0.0.4.tar.gz
  • Upload date:
  • Size: 9.5 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.4.tar.gz
Algorithm Hash digest
SHA256 70a18532eea8d3b30c91edc8f2b14edf730c9d86739472735cb67a2653e740a9
MD5 f4c4a0d4e71461a9e61f2ecd1df71328
BLAKE2b-256 4a4339610f009d4336a8d2731680374b0717b1e01f8d770b02a28ade15be8ddb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ndjsonlib-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 9.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8f05d4897baa8bdb3579aad4f6b14aee720c2f8a84af9370f1bf93f486927835
MD5 dee47ab98abbd850d967d5242f925d21
BLAKE2b-256 90429961426e4c9ca3b72634c08cc6d8b7b18faf601743e318d469e76c62a1b7

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