This release is a pre-release and may not be stable for production use.
jsonmetamodel
jsonmetamodel is used to provide a definition of struct like classes with direct type conversion, which are returning a Mapping type like dict.
Installing
Installing the latest release using pip is recommended.
$ pip install jsonmetamodel
Basic Usage
>>> from jsonmetamodel import JsonModel, JsonInteger, JsonString
>>> class Person(JsonModel):
... name = JsonString()
... age = JsonInteger()
...
>>> person = Person({"age": "65", "name": "Max Power"})
>>> person
MappingTreeItem({"age": 65, "name": "Max Power"})
>>> person["age"]
65
>>> person.age
65
>>> person.age = 66
>>> person.age
66
>>> dict(person)
{"age": 65, "name": "Max Power"}
Contribution
Any contribution by reporting a bug or desired changes are welcomed. The preferred way is to create an issue on the gitlab's project page, to keep track of everything regarding this project.
Contribution of Source Code
Code style
This project follows the recommendations of PEP8. The project is using black as the code formatter.
Workflow
- Fork the project on Gitlab.
- Commit changes to your own branch.
- Submit a pull request from your fork's branch to our branch 'dev'.
Authors
License
This project is licensed under the GNU GENERAL PUBLIC LICENSE - see the LICENSE file for details
Acknowledge
Metadata
Release files for jsonmetamodel 0.1a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jsonmetamodel-0.1a0.tar.gz | 27.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jsonmetamodel-0.1a0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.8 kB
Release files / jsonmetamodel-0.1a0.tar.gz
| Download URL | jsonmetamodel-0.1a0.tar.gz |
|---|---|
| Size | 27.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56c75759d7db553d3f3bc9dfa3164d66dd34548c7c848ea2d3e47bf53ce7dfc3
|
|
BLAKE2b-256 checksum How to use checksums |
3e2e2dc8d8de65b210c2c2199d5ca2e3b5a8b25afba9b2e0ecc38fc318461f67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.9
|
Release files / jsonmetamodel-0.1a0-py3-none-any.whl
| Download URL | jsonmetamodel-0.1a0-py3-none-any.whl |
|---|---|
| Size | 22.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c10447f23236638b4a0ae9009870429a15fc89960fb3a0b267bbba0e82c62b88
|
|
BLAKE2b-256 checksum How to use checksums |
b6d539f8a9fcbe70b62b4aa614884a1e0d64cb715b813c1165dda586b523c902
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.9
|