Pyonize
convert json|dict to python object
Setup
pip install pyonize
Examples
from pyonize import pyonize
deneme = pyonize({"id": 1, "name": "jhon", "job": {"id": 1, "title": "CTO"}, "list": [
1, 2, 3], "dictlist": [{"name": "foo"}, {"name": "bar"}]})
print(deneme.name)
print(deneme.job)
print(deneme.job.title)
from pyonize import Pyon
class Foo(Pyon):
def bar(self):
...
data = {"id": 1, "name": "jhon", "job": {"id": 1, "title": "CTO"},
"list": [1, 2, 3], "dictlist": [{"name": "foo"}, {"name": "bar"}]}
foo = Foo(data)
print(foo.id)
print(foo.dictlist[1].name)
Metadata
Release files for pyonize 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyonize-0.1.5.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyonize-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.8 kB
Release files / pyonize-0.1.5.tar.gz
| Download URL | pyonize-0.1.5.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7327d5bb3c308129e095f334b9a5ea78d9327320de71fdbf6dc34d07ade6f679
|
|
BLAKE2b-256 checksum How to use checksums |
95570cb0c16057cfc9243dd94f2d006db055e6fee9f4cc9d9d06a2a47eb81c48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.10.0 Windows/10
|
Release files / pyonize-0.1.5-py3-none-any.whl
| Download URL | pyonize-0.1.5-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e2e9865665ce7941348271a5b45f5dba106af129ffe17674a0ee0071d43211c
|
|
BLAKE2b-256 checksum How to use checksums |
a632201f7fd80d28be743ada6319f48956d54cdd3c6eb410f77fa047fc83f4dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.10.0 Windows/10
|