Skip to content

vguzov/zipjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Installation

pip install zipjson

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

About

A simple tool to create compressed json files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages