Read Write JSON
Load JSON Settings from file
Write JSON Settings to file
- Read settings file from json format and return it
- Write settings file from json format
- Interactive write in json settings with save option
- Write out json file if file is missing
- values
- string, int, float
- [list], {"dict":"value"}
pip install jsonreadwrite
Todo: Write proper documentation
from jsonreadwrite import JsonReadWrite
testlist = ["test1", "test2", "test3"]
testdict = {"test1": "test1", "test2": "test2", "test3": "test3"}
testint = 1
testfloat = 1.1
testbool = True
testnone = None
testblank = ""
test = JsonReadWrite("test.json",allowempty=True)
test.set("testlist", testlist)
test.set("testdict", testdict)
test.set("testint", testint)
test.set("testfloat", testfloat)
test.set("testbool", testbool)
test.set("testnone", testnone)
test.set("testblank", testblank)
assert test.get("testlist") == testlist
assert test.get("testdict") == testdict
assert test.get("testint") == testint
assert test.get("testfloat") == testfloat
assert test.get("testbool") == testbool
assert test.get("testnone") == testnone
assert test.get("testblank") == testblank
{
"testlist": [
"test1",
"test2",
"test3"
],
"testdict": {
"test1": "test1",
"test2": "test2",
"test3": "test3"
},
"testint": 1,
"testfloat": 1.1,
"testbool": true,
"testnone": null,
"testblank": ""
}
Metadata
Release files for jsonreadwrite 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jsonreadwrite-1.0.0.tar.gz | 3.5 kB | Without provenance | Details for jsonreadwrite-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jsonreadwrite-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for jsonreadwrite-1.0.0-py3-none-any.whl |
Total release size: 7.4 kB
Release files / jsonreadwrite-1.0.0.tar.gz
| Download URL | jsonreadwrite-1.0.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b11c4bbdbcd13c96f009d983c2b1c44f014069a3439e9bee8f00b41a42ae291f
|
|
BLAKE2b-256 checksum How to use checksums |
201c95101fad6c9885aa15b0ff2d7880bc53bf09937e84ed274a89125136d0cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.13
|
Release files / jsonreadwrite-1.0.0-py3-none-any.whl
| Download URL | jsonreadwrite-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c6efc41e60480c3b52233150bb652e46513707ca875b3336dade15cc75344af
|
|
BLAKE2b-256 checksum How to use checksums |
808f6403637820a93125cc68fec67490f8dae264b0a31214cb7fb0bf0dec2e3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.13
|
Security for jsonreadwrite 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.