Skip to main content

A tool to create and read compressed JSON files

Project description

zipjson - a simple tool to create and read compressed JSON files

Installation

pip install git+https://github.com/vguzov/zipjson.git

Usage:

The following code creates a .zip archive with data.json file inside it, containing the serialized data, then reads it

import zipjson
any_jsonable_data = {"something":42}
file_object = open("test.json.zip", "wb") # Mind the additional 'b' flag
zipjson.dump(any_jsonable_data, file_object)
loaded_data = zipjson.load(open("test.json.zip", "rb"))
print(loaded_data) # {'something': 42}

In-memory methods dumps and loads are supported as well

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

zipjson-0.0.1.tar.gz (1.8 kB view hashes)

Uploaded Source

Built Distribution

zipjson-0.0.1-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page