Read and write Dataset-JSON as NDJSON
Project description
ndjsonlib
Introduction
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
- refine API / class interfaces
- complete documentation
- update tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49d8a49b50e1386c0480018208674657b8dd9bc38c0cd13f2dab502ef1e91d35
|
|
| MD5 |
c343710386ce4d814306dc959f7afb36
|
|
| BLAKE2b-256 |
c4f47f1617e6142840e23d339a68f4ddaa4548a8bc3ff6e4d22108ed9832c6d7
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
737c23bfcd723cce8b8880f5322e7d79060a24d0e111d98f072ee17801d13196
|
|
| MD5 |
f4d7a5c162a90f23ab10801585dc3ff4
|
|
| BLAKE2b-256 |
03df7d977b5bba83d38b74cbaf83f6ab26e470784705a2a1ec38401c61070484
|