Name | python-dtoc JSON |
Version |
2023.10.5
JSON |
| download |
home_page | |
Summary | Awesome module for conver dict to class |
upload_time | 2023-10-04 16:42:59 |
maintainer | |
docs_url | None |
author | ZAID |
requires_python | ~=3.6 |
license | |
keywords |
json
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# About this project:
- This project created to convert any dict into class in python :) check [github](https://github.com/x72x/PyDTOC/tree/main)
# Install:
- `pip install python-dtoc`
## Simple example:
- <b>Print the object :</b>
---
```python
from pydtoc import dtc
foo = dtc({'str': 'string', 'int': 1, 'list': [1, 2, 3, 4, {'hi': True}]})
print(foo)
```
- <b>Output :</b>
```json
{
"str": "string",
"int": 1,
"list": [
1,
2,
3,
4,
{
"hi": true
}
]
}
```
- <b>Print key of value :</b>
---
```python
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)
```
- <b>Output :</b>
```
True
string
```
Raw data
{
"_id": null,
"home_page": "",
"name": "python-dtoc",
"maintainer": "",
"docs_url": null,
"requires_python": "~=3.6",
"maintainer_email": "",
"keywords": "json",
"author": "ZAID",
"author_email": "y8838@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/50/6e/76a833e6f585d0b7e9878283f229c4e71df1768d4e728ece033420caac85/python-dtoc-2023.10.5.tar.gz",
"platform": null,
"description": "\r\n# About this project:\r\n\r\n- This project created to convert any dict into class in python :) check [github](https://github.com/x72x/PyDTOC/tree/main)\r\n\r\n\r\n\r\n\r\n\r\n# Install:\r\n\r\n- `pip install python-dtoc`\r\n\r\n\r\n\r\n\r\n\r\n## Simple example:\r\n\r\n- <b>Print the object :</b>\r\n\r\n---\r\n\r\n```python\r\n\r\nfrom pydtoc import dtc\r\n\r\nfoo = dtc({'str': 'string', 'int': 1, 'list': [1, 2, 3, 4, {'hi': True}]})\r\n\r\nprint(foo)\r\n\r\n```\r\n\r\n\r\n\r\n- <b>Output :</b>\r\n\r\n```json\r\n\r\n{\r\n\r\n \"str\": \"string\",\r\n\r\n \"int\": 1,\r\n\r\n \"list\": [\r\n\r\n 1,\r\n\r\n 2,\r\n\r\n 3,\r\n\r\n 4,\r\n\r\n {\r\n\r\n \"hi\": true\r\n\r\n }\r\n\r\n ]\r\n\r\n}\r\n\r\n```\r\n\r\n\r\n\r\n- <b>Print key of value :</b>\r\n\r\n---\r\n\r\n```python\r\n\r\nfrom pydtoc import dtc\r\n\r\nfoo = dtc({'str': 'string', 'int': 1, 'list': [1, 2, 3, 4, {'hi': True}]})\r\n\r\nprint(foo.list[-1].hi)\r\n\r\nprint(foo.str)\r\n\r\n```\r\n\r\n\r\n\r\n- <b>Output :</b>\r\n\r\n```\r\n\r\nTrue\r\n\r\nstring\r\n\r\n```\r\n\r\n",
"bugtrack_url": null,
"license": "",
"summary": "Awesome module for conver dict to class",
"version": "2023.10.5",
"project_urls": null,
"split_keywords": [
"json"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e22a5fb867fbe868e5d58f00d916554011a9a4043b37ff87bc291b55d3309511",
"md5": "c2da993bdfa6c7fbfd5743ea8b35d81a",
"sha256": "3a5334ce0d16cc43f4d5e0419b9b22a5226a632884378f87f7d0118057adc287"
},
"downloads": -1,
"filename": "python_dtoc-2023.10.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c2da993bdfa6c7fbfd5743ea8b35d81a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.6",
"size": 3030,
"upload_time": "2023-10-04T16:42:57",
"upload_time_iso_8601": "2023-10-04T16:42:57.475530Z",
"url": "https://files.pythonhosted.org/packages/e2/2a/5fb867fbe868e5d58f00d916554011a9a4043b37ff87bc291b55d3309511/python_dtoc-2023.10.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "506e76a833e6f585d0b7e9878283f229c4e71df1768d4e728ece033420caac85",
"md5": "1648d67963ab16933f7b80aa57664c69",
"sha256": "eabcb3a8724044aec099533f0b4772c84ba97e34d2504d341843d1ba2a2af845"
},
"downloads": -1,
"filename": "python-dtoc-2023.10.5.tar.gz",
"has_sig": false,
"md5_digest": "1648d67963ab16933f7b80aa57664c69",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.6",
"size": 2980,
"upload_time": "2023-10-04T16:42:59",
"upload_time_iso_8601": "2023-10-04T16:42:59.234692Z",
"url": "https://files.pythonhosted.org/packages/50/6e/76a833e6f585d0b7e9878283f229c4e71df1768d4e728ece033420caac85/python-dtoc-2023.10.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-04 16:42:59",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "python-dtoc"
}