Skip to main content

JSON to NDJSONify

Table of Contents

Overview

JSON to NDJSONify is a Python package specifically engineered for converting JSON files to NDJSON (Newline Delimited JSON) format. Built for developers who are working with APIs or data platforms that require NDJSON input, this package helps streamline your workflow by automating the conversion process.

Features

  • Supports complex nested JSON structures
  • Ability to filter specific nodes (e.g., edges)
  • Highly optimized and lightweight
  • Written in Python, making it highly extensible and maintainable
  • Unit tests to validate NDJSON output

Installation

Clone the repository:

git clone https://github.com/mohjak/json_to_ndjsonify.git

Navigate to the cloned directory and run:

pip install .

Or directly via pip:

pip install json-to-ndjsonify

Usage

Basic Usage

To convert a JSON file to NDJSON:

json-to-ndjsonify --input sample.json --node edges

This will create an NDJSON file in the same directory as the sample.json file, suffixed with a timestamp.

Advanced Usage

For additional configurations, consult the inline help:

json-to-ndjsonify --help

Configuration

Command-Line Parameters

  • --input: Specifies the path of the JSON file to be converted.

  • --node: Specifies the node name in the JSON file. Default is 'edges'.

  • --output: Path to the output folder.

    Example:

    json-to-ndjsonify --input /path/to/your/file.json --node custom_edges --output /path/to/output/folder
    

Running Tests

To execute the unit tests:

export NDJSON_DIR=/path/to/your/ndjson/directory
python -m unittest tests/test_main.py

Contributing

See the CONTRIBUTING.md file for how to contribute to this project.

License

This package is licensed under the MIT License. See the LICENSE.md file for details.

Metadata

Release files for json-to-ndjsonify 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for json-to-ndjsonify 0.1.0
File Size Uploaded Provenance
json-to-ndjsonify-0.1.0.tar.gz 4.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for json-to-ndjsonify 0.1.0
File Interpreter ABI Platform
json_to_ndjsonify-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / json-to-ndjsonify-0.1.0.tar.gz

Download URL json-to-ndjsonify-0.1.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
153f81ef600f7a3754b8d08c8df9f1d905458341386024dc67b2c5fbdecf14b9
BLAKE2b-256 checksum
How to use checksums
ce344fdf454724127f618ad71d275c7414a564db039407c96132b3c3cf382bef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / json_to_ndjsonify-0.1.0-py3-none-any.whl

Download URL json_to_ndjsonify-0.1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8cbbba2aeb79fe3c411a00fc63756ed5d780dd8055ed197af267c5eb0f9093f
BLAKE2b-256 checksum
How to use checksums
817aebb61d30019789628cc0c8f1df8ab3a2e0cf602638263be95ec7cfc4e6af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for json-to-ndjsonify 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page