About this project:
- This project created to convert any dict into class in python :) check github
Install:
pip install python-dtoc
Simple example:
- Print the object :
from pydtoc import dtc
foo = dtc({'str': 'string', 'int': 1, 'list': [1, 2, 3, 4, {'hi': True}]})
print(foo)
- Output :
{
"str": "string",
"int": 1,
"list": [
1,
2,
3,
4,
{
"hi": true
}
]
}
- Print key of value :
from pydtoc import dtc
foo = dtc({'str': 'string', 'int': 1, 'list': [1, 2, 3, 4, {'hi': True}]})
print(foo.list[-1].hi)
print(foo.str)
- Output :
True
string
Metadata
Release files for python-dtoc 2023.10.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 | |
|---|---|---|---|
| python-dtoc-2023.10.5.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_dtoc-2023.10.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.0 kB
Release files / python-dtoc-2023.10.5.tar.gz
| Download URL | python-dtoc-2023.10.5.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eabcb3a8724044aec099533f0b4772c84ba97e34d2504d341843d1ba2a2af845
|
|
BLAKE2b-256 checksum How to use checksums |
506e76a833e6f585d0b7e9878283f229c4e71df1768d4e728ece033420caac85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / python_dtoc-2023.10.5-py3-none-any.whl
| Download URL | python_dtoc-2023.10.5-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a5334ce0d16cc43f4d5e0419b9b22a5226a632884378f87f7d0118057adc287
|
|
BLAKE2b-256 checksum How to use checksums |
e22a5fb867fbe868e5d58f00d916554011a9a4043b37ff87bc291b55d3309511
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|