singlejson
A simple set of utilities for working with JSON in Python.
View the documentation here.
Features:
- Easy loading of JSON files
- One instance for each opened file
- Multiple ways of handling default values
Installation:
Install singlejson using pip
pip install singlejson
Usage:
Loading JSON from a file:
import singlejson
file = singlejson.load('file.json') # Load file.json
# Returns a JSONFile object which has the json property
file.json["fun"] = True # Edit some values in the JSONFile
When we load the same file from the filesystem again, we get the same object:
import singlejson
file2 = singlejson.load('file.json')
print(file2.json["fun"]) # > True
To save the file back to the disk we call file.save()
If the requested file doesn't exist, the file and its parent directories will be created and default_data will be written.
import singlejson
file = singlejson.load('new_file.json', default_data={"fun": False})
print(file.json) # > {"fun": False}
Or initialize the file with a default file path:
import singlejson
file = singlejson.load('auth.json', default_path='defaults/auth.json')
This way you can commit default files to your repository. If the file doesn't exist or is corrupt, the default file will be copied to the requested location.
For more detailed information, visit the documentation
Contributing:
This is just a fun project of mine mainly to try out python packaging. If you would like to contribute or have a feature-request, please open an issue or pull request.
Metadata
Release files for singlejson 0.5.2
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 |
|---|---|---|---|---|
| singlejson-0.5.2.tar.gz | 89.3 kB | With provenance | Details for singlejson-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| singlejson-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for singlejson-0.5.2-py3-none-any.whl |
Total release size: 111.5 kB
Release files / singlejson-0.5.2.tar.gz
| Download URL | singlejson-0.5.2.tar.gz |
|---|---|
| Size | 89.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a0e8e5b70abeb7d1733d8a04f4616e8e48ac5d36e7f938b3853c8ffb7178042
|
|
BLAKE2b-256 checksum How to use checksums |
43b900a46eca7fd0649b4776c97303371c9ba82a20e466a654b06b3fa55266fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 16, 2026.
Transparency logRelease files / singlejson-0.5.2-py3-none-any.whl
| Download URL | singlejson-0.5.2-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c824a991b527e517a1d2f08d1337a0e01779a5e15b708a98b0da0c7ea8b20756
|
|
BLAKE2b-256 checksum How to use checksums |
efee6615fb35d90fa9bced938c7cc7c5852e99c23253ae60ca39f49c945e9969
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 16, 2026.
Transparency logSecurity for singlejson 0.5.2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for singlejson-0.5.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 16, 2026.
Transparency logA 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.