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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyjsonutils-0.3.0.tar.gz.
File metadata
- Download URL: pyjsonutils-0.3.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36a8e2b43355a8e0449d794835c77a05fde2284c1208b8a4fe17ea070386cee6
|
|
| MD5 |
d067ad62cb9f020d86fcf2c67a77a672
|
|
| BLAKE2b-256 |
760e58a402a3f03eaadef92ed8e303edd5bf48b0b45ef90b0ac6e5833c38be5f
|
File details
Details for the file pyjsonutils-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pyjsonutils-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
929c5a50fcb46f7311cc1ec08fb5f1c584f7195e866eda6d9155296a41378856
|
|
| MD5 |
2fc4479d276bcf5099b1450bc4639dd2
|
|
| BLAKE2b-256 |
f82b5ed905ad60d2e33d110ec788208693a890446247a417fac4ed4119c92a4c
|