Skip to main content

pyModularJSON

Allows recursive loading of JSON files featuring comments. Now uses json5 so it is a bit less picky on line terminations

Authored by Edwin Peters

Install

pip install pyLoadModularJson

or

setup.py install

Usage

Also check tests folder for a few examples

base.json:

// comments
{
    "param2a": 2,
    "nestedParam2a":{
	"a": "notaNumber",
	"c": "set by base"
    }
}

main.json:

// comments
{
    "configBase": ["base.json"], // parent config file name relative to this file
    "param1": 4,
    "nestedParam1":{
	"a":39,
	"b":["peee","e","new"],
	"c": "set by main"
    } 
}

In Python:

from pyLoadModularJson import loadModularJson

cfg = loadModularJson('base.json')

print(cfg)

Child files will overwrite attributes from base files.

See more examples in tests

Metadata

Release files for pyLoadModularJson 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyLoadModularJson 0.9.1
File Size Uploaded Provenance Actions
pyLoadModularJson-0.9.1.tar.gz 4.0 kB Without provenance Details for pyLoadModularJson-0.9.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyLoadModularJson 0.9.1
File Interpreter ABI Platform Actions
pyLoadModularJson-0.9.1-py3-none-any.whl Python 3 none any Details for pyLoadModularJson-0.9.1-py3-none-any.whl

Total release size: 8.5 kB

Release files / pyLoadModularJson-0.9.1.tar.gz

Download URL pyLoadModularJson-0.9.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e5456483896548b1816db73188023d4663d3922e80b253d2619738e2e6d67fb1
BLAKE2b-256 checksum
How to use checksums
cacbb446edf213408db628eb0ca09112d8fb4d85af1b489129aa81d22ab4f99a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

Release files / pyLoadModularJson-0.9.1-py3-none-any.whl

Download URL pyLoadModularJson-0.9.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
939ae4574bbd7d6a1421634e10f23ffffeeb10a380f53f9e93a3ea3a5746226c
BLAKE2b-256 checksum
How to use checksums
ed72a1c115a15cb9e6e0da15ee7c00297508aa7be7880ca777d86ae6d25c2dc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

Security for pyLoadModularJson 0.9.1

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.

Release history Release notifications | RSS feed

This release

0.9.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page