Skip to main content

jsonunwrap

jsonunwrap is a simple JSON flattening and normalization library.

>>> import jsonunwrap as ju
>>> url = "https://dummyjson.com/products"
>>> fetchdata = ju.fetch_json(url)
>>> df = ju.unwrap_data(fetchdata)
>>> df.columns
Index(['id', 'title', 'description', 'category', 'price', 'discountPercentage',
       'rating', 'stock', 'tags', 'brand', 'sku', 'weight',
       'warrantyInformation', 'shippingInformation', 'availabilityStatus',
       'returnPolicy', 'minimumOrderQuantity', 'images', 'thumbnail',
       'dimensions.width', 'dimensions.height', 'dimensions.depth',
       'meta.createdAt', 'meta.updatedAt', 'meta.barcode', 'meta.qrCode',
       'rating_reviews', 'comment', 'date', 'reviewerName', 'reviewerEmail'],
      dtype='object')
>>> len(df)
3771

jsonunwrap allows you to deeply normalize complex, semi-structured nested JSON data into clean pandas DataFrames extremely easily.


Installing jsonunwrap

jsonunwrap is available on PyPI:

$ python -m pip install jsonunwrap

Supported Features & Best–Practices

jsonunwrap is ready for the data parsing demands of modern web APIs, automation scripts, and data engineering pipelines.

  • Recursive Deep-Flattening (Dot-notation formatting for sub-dictionaries)
  • Automated List Explosion (Spanning embedded primitive lists safely into unique rows)
  • Endpoint Target Binding (Fetch and write stream sequences in a single wrapper)
  • Clean API Namespace (Unified module boundaries with zero complex configuration maps)

Quick Usage Reference

Download, Normalize, and Export an API Stream to Disk

import jsonunwrap as ju

target_url = "url"
output_file = "data/normalized_users.csv"

# Fetch, unwrap nested schemas, and generate a local CSV payload
df = ju.json_to_csv(target_url, output_file)

Core API Documentation

The complete package interaction map exposes three primary interfaces:

jsonunwrap.unwrap_data(data)

Recursively flattens an in-memory dictionary or list of records. Returns a parsed pandas.DataFrame.

jsonunwrap.fetch_json(url, **kwargs)

A connection delivery utility utilizing the requests transport subsystem. Passes **kwargs onwards to target handlers.

jsonunwrap.json_to_csv(url, output_path)

High-level workflow coordinator connecting remote schema acquisition loops directly to a structural local CSV export.


Contributions & Testing

To test modifications locally or prepare adjustments, execute using pytest:

\$ git clone https://github.com/njuedominic/json-unwrap
\$ cd jsonunwrap
\(python -m pip install -e .[test]\) pytest

Metadata

Release files for jsonunwrap 0.2.3

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

Source distribution (sdist)

Source distribution for jsonunwrap 0.2.3
File Size Uploaded Provenance Actions
jsonunwrap-0.2.3.tar.gz 4.6 kB Without provenance Details for jsonunwrap-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jsonunwrap 0.2.3
File Interpreter ABI Platform Actions
jsonunwrap-0.2.3-py3-none-any.whl Python 3 none any Details for jsonunwrap-0.2.3-py3-none-any.whl

Total release size: 9.0 kB

Release files / jsonunwrap-0.2.3.tar.gz

Download URL jsonunwrap-0.2.3.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
721defb4dbf3e1ee118e8c4014843b4e8c4070e39628e1165ba6b1d2ecc010cf
BLAKE2b-256 checksum
How to use checksums
49010249250c345e114fe1026010ada6597696824b703ab51fde0ba59f593d39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / jsonunwrap-0.2.3-py3-none-any.whl

Download URL jsonunwrap-0.2.3-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc7fa4f43755215accfd33cdb9acce542beb0bc766fe2a29ce713c25c7c33ab8
BLAKE2b-256 checksum
How to use checksums
232dce581635f1d52764c5eb8205005ac250d529f4df0d97b9112d079015d158
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for jsonunwrap 0.2.3

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.

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