justobjects
Simple python data objects management and validation based on standard jsonschema concepts. Project requires python3.6+ and allows users define how data objects should look and relate with other data objects. Supports python3.6+ typing annotations and customs attributes for more complex relationships.
Objectives
Define and demarcate data objects with just python annotations
Define constraints in simple jsonschema compliant manner
Validate data objects using standard jsonschema validators
Express complete jsonschema as simple data objects (its just objects)
Similar Projects
Install
install from pip
$ pip install justobjects
install from source
$ pip install git+https://github.com/kulgan/justobjects@<version>#egg=justobjects
Usage Example
import json
import justobjects as jo
@jo.data(typed=True)
class Model:
a: int
b: float
c: str
# display schema
print(json.dumps(jo.show_schema(Model), indent=2))
try:
# fails validation
jo.validate(Model(a=3.1415, b=2.72, c="123"))
except jo.ValidationException as err:
print(err.errors)
Contributing
The fastest way to get feedback on contributions/bugs is create a issues
Running Tests
The project makes use of tox to run tests and other common tasks
$ tox -e py36
Metadata
Release files for justobjects 0.3.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 |
|---|---|---|---|---|
| justobjects-0.3.0.tar.gz | 32.3 kB | Without provenance | Details for justobjects-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| justobjects-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for justobjects-0.3.0-py3-none-any.whl |
Total release size: 53.2 kB
Release files / justobjects-0.3.0.tar.gz
| Download URL | justobjects-0.3.0.tar.gz |
|---|---|
| Size | 32.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e76a811471c9cffe76eda6568046a4fad64a633ec7875f24f3e45541f8217a97
|
|
BLAKE2b-256 checksum How to use checksums |
c867d77d91ad9de0b6010a90d8f606b06346ee4ae48c6bd233bacf2c346cfee7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / justobjects-0.3.0-py3-none-any.whl
| Download URL | justobjects-0.3.0-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23a616eb53f53aa3d3709a443933c55db0a6bad0471ffd104ea1b601c335a677
|
|
BLAKE2b-256 checksum How to use checksums |
e5baa47fea44743855647ca33a3cacd5e993b6485fc2e68896df230216d2c4a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Security for justobjects 0.3.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.