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
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
zipjson-0.0.1.tar.gz
(1.8 kB
view hashes)