Name | pydtoc JSON |
Version |
2023.10.4
JSON |
| download |
home_page | |
Summary | Awesome module for conver dict to class |
upload_time | 2023-10-04 15:04:02 |
maintainer | |
docs_url | None |
author | ZAID |
requires_python | ~=3.0 |
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 pydtoc`
## 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": "pydtoc",
"maintainer": "",
"docs_url": null,
"requires_python": "~=3.0",
"maintainer_email": "",
"keywords": "json",
"author": "ZAID",
"author_email": "y8838@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/48/69/3119adf3be3ffd589ec3a4eb4a1f46ab421b6114e80a4ee2479133bcc6c2/pydtoc-2023.10.4.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 pydtoc`\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\n\r\n\r\nfoo = dtc({'str': 'string', 'int': 1, 'list': [1, 2, 3, 4, {'hi': True}]})\r\n\r\n\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\n\r\n\r\nfoo = dtc({'str': 'string', 'int': 1, 'list': [1, 2, 3, 4, {'hi': True}]})\r\n\r\n\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.4",
"project_urls": null,
"split_keywords": [
"json"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f38ca4b8ad85648ffc0b0dd5b739ccae96895fed3c1d9042603081124810f650",
"md5": "6b1632d016507ec4f9f698be593cfc1b",
"sha256": "49ad66d919fc82276d1fd9fb7402b6a5fa95f4584a57220adb8a2bfe7d3df1d1"
},
"downloads": -1,
"filename": "pydtoc-2023.10.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6b1632d016507ec4f9f698be593cfc1b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.0",
"size": 2406,
"upload_time": "2023-10-04T15:03:59",
"upload_time_iso_8601": "2023-10-04T15:03:59.990476Z",
"url": "https://files.pythonhosted.org/packages/f3/8c/a4b8ad85648ffc0b0dd5b739ccae96895fed3c1d9042603081124810f650/pydtoc-2023.10.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "48693119adf3be3ffd589ec3a4eb4a1f46ab421b6114e80a4ee2479133bcc6c2",
"md5": "81a58ba5818649472c93e858ebc33190",
"sha256": "b798ce32ce1fb8aaf2b4278eb09cd68a11dcc4b1f1be1eab39af8dfa3f7a41c5"
},
"downloads": -1,
"filename": "pydtoc-2023.10.4.tar.gz",
"has_sig": false,
"md5_digest": "81a58ba5818649472c93e858ebc33190",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.0",
"size": 2487,
"upload_time": "2023-10-04T15:04:02",
"upload_time_iso_8601": "2023-10-04T15:04:02.735919Z",
"url": "https://files.pythonhosted.org/packages/48/69/3119adf3be3ffd589ec3a4eb4a1f46ab421b6114e80a4ee2479133bcc6c2/pydtoc-2023.10.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-04 15:04:02",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pydtoc"
}