Some basic functions used often with JSON files
Project description
PyJSONUtils
A Python library for using JSON files.
Usage
To open a file:
from pyjsonutils import pyjsonutils
pyjsonutils.open_file_as_dict("file_path.json")
To write to a file:
from pyjsonutils import pyjsonutils
pyjsonutils.write_dict_to_file(dictionary, "file_path.json")
To update a JSON file:
from pyjsonutils import pyjsonutils
pyjsonutils.update_json_file("file_path.json")
Find the first key having a given value:
from pyjsonutils import pyjsonutils
pyjsonutils.find_key_from_value(dictionary, value)
Create a default value for a key if the key does not exist:
from pyjsonutils import pyjsonutils
pyjsonutils.create_default_if_key_not_there(dictionary, key, default_value)
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
pyjsonutils-0.3.0.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for pyjsonutils-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 929c5a50fcb46f7311cc1ec08fb5f1c584f7195e866eda6d9155296a41378856 |
|
MD5 | 2fc4479d276bcf5099b1450bc4639dd2 |
|
BLAKE2b-256 | f82b5ed905ad60d2e33d110ec788208693a890446247a417fac4ed4119c92a4c |