Skip to main content
https://travis-ci.org/TonyFlury/py-importjson.png?branch=master

importjson : Import json data into a python application

It is sometimes useful to be able to use json data to initialise classes and other data structures, giving your application a portable and human readable configuration capability. To do this you will probably write some level of functionality around the json standard library, and use the resulting data loaded from the json file, to populate classes and instances implemented in your application. This separates your data and functionality, which can often present challenges later down the line as you need to keep the data and functionality in step. It would be better in many cases to be able to combine the data and functionality in a single place, and with the importjson library you can do that.

The library allows you to import a json file direct into your python application, and automatically build a real python module, complete with classes, class attributes, and instance data attributes (implemented with set and get descriptors).

Your code can use these classes, attributes and methods just as if you have written the code yourself.

The importjson library also allows you to set constraints on your instance attributes, checking for the data type and simple range checks on the values your attempt to set when you create instances of the classes. You can also determine whether attributes are read only, or whether they will be allowed to be set to None (or not).

See the full documentation for examples of how to use the library and how to format the json file.

Bugs

Every care is taken to try to ensure that this code comes to you bug free. If you do find an error - please report the problem on : GitHub or by email to : Tony Flury

Metadata

Release files for importjson 0.2.3

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

Built distributions (wheels)

Table of built distributions (wheels) for importjson 0.2.3
File Interpreter ABI Platform Actions
importjson-0.2.3-py3-none-any.whl Python 3 none any Details for importjson-0.2.3-py3-none-any.whl
importjson-0.2.3-py2-none-any.whl Python 2 none any Details for importjson-0.2.3-py2-none-any.whl

Total release size: 23.6 kB

Release files / importjson-0.2.3-py3-none-any.whl

Download URL importjson-0.2.3-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8c7cfb54278fe9cd6842fe92b07c4de2efec2910bc5ce75c16cd9a9454e28cc
BLAKE2b-256 checksum
How to use checksums
3c2d17b7fddf7b40193cc4b38789f24f0f8e62cafd9bb87352e4c1420af9b843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15rc1

Release files / importjson-0.2.3-py2-none-any.whl

Download URL importjson-0.2.3-py2-none-any.whl
Size 11.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
d080e8ba48e64454d493bd1ba20d944b703550625d1dd350976f76de92343a55
BLAKE2b-256 checksum
How to use checksums
eb55e6cb8f8c764a4c84bbff20098fafd1750965fad33e1f744a240ed4c4e4c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15rc1

Security for importjson 0.2.3

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.

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