| Name | Clict JSON |
| Version |
0.5.4
JSON |
| download |
| home_page | None |
| Summary | Python Dict with classlike access to its contents (dot.notation,creates missing keys on the fly,...) |
| upload_time | 2024-08-22 02:50:39 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | None |
| license | None |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# Clict
Python Dict with classlike access to its contents (dot.notation,creates missing keys on the fly,...)
## Dict VS Clict:
### Creation & Initialisation:
Dict only one step:
```py
x={'y': 'z'}
```
or
```py
x=dict(y=z)
```
Clict you need to call the class first:
```py
a=Clict()
```
Then these work:
```py
a.b='c'
# or
a['b']= 'c'
# you can call the class and populate when doing so,
Clict(a=1, b=2)
```
note: this works recursively if the key doesnt exist for that Clict , its created as a new Clict so this works
for initializing deeply nested 'dicts' :
```py
a=Clict()
a.b.c.d.e.f.g.h.i.j=''
```
### Usage:
you can both assign and recall values by the dot notation as with the conventional dict square brackets, and they can be mixed in a single lookup, However where you can create a dict with
```py
a={}
```
Clict unfortunatly cannot be a drop in replacement for dicts as the only way to create one is by calling the Class on it. Then you can assign values to keys in it.
```py
a=Clict(
)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "Clict",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/c0/cd/82cefeaddc54bd2ff11de77ee11242da13841d73e9d60a99f74f33bf82be/clict-0.5.4.tar.gz",
"platform": null,
"description": "# Clict\nPython Dict with classlike access to its contents (dot.notation,creates missing keys on the fly,...)\n\n## Dict VS Clict:\n### Creation & Initialisation:\n Dict only one step:\n```py\nx={'y': 'z'}\n```\nor\n```py\nx=dict(y=z)\n```\n\nClict you need to call the class first:\n```py\na=Clict()\n```\nThen these work:\n```py\na.b='c' \t\t\t\t\n\t# or\na['b']= 'c'\n# you can call the class and populate when doing so,\nClict(a=1, b=2) \n\n```\nnote: this works recursively if the key doesnt exist for that Clict , its created as a new Clict so this works\nfor initializing deeply nested 'dicts' :\n```py\na=Clict()\na.b.c.d.e.f.g.h.i.j=''\n```\n\n### Usage:\nyou can both assign and recall values by the dot notation as with the conventional dict square brackets, and they can be mixed in a single lookup, However where you can create a dict with \n```py\na={}\n```\nClict unfortunatly cannot be a drop in replacement for dicts as the only way to create one is by calling the Class on it. Then you can assign values to keys in it. \n```py\na=Clict(\n)\n\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Python Dict with classlike access to its contents (dot.notation,creates missing keys on the fly,...)",
"version": "0.5.4",
"project_urls": {
"Homepage": "https://github.com/hoefkensj/Clict",
"Issues": "https://github.com/hoefkensj/Clict/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "774d2a982f9224a9b134c27ff92d36031130dac44ec7319699e6bc5c01d08815",
"md5": "08bcf3e13bf323f5371b0b97fb820715",
"sha256": "bdfc8ebff2ad48b94e1f3ce942faf55c9643df89e17723725be7745ea5107d30"
},
"downloads": -1,
"filename": "Clict-0.5.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "08bcf3e13bf323f5371b0b97fb820715",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9579,
"upload_time": "2024-08-22T02:50:38",
"upload_time_iso_8601": "2024-08-22T02:50:38.597745Z",
"url": "https://files.pythonhosted.org/packages/77/4d/2a982f9224a9b134c27ff92d36031130dac44ec7319699e6bc5c01d08815/Clict-0.5.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c0cd82cefeaddc54bd2ff11de77ee11242da13841d73e9d60a99f74f33bf82be",
"md5": "c076427b88da63015c91823dd2341c96",
"sha256": "5798d79e49ac288551a559c3e4eb99909c90c8da887da11518525dbdb9620600"
},
"downloads": -1,
"filename": "clict-0.5.4.tar.gz",
"has_sig": false,
"md5_digest": "c076427b88da63015c91823dd2341c96",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17114,
"upload_time": "2024-08-22T02:50:39",
"upload_time_iso_8601": "2024-08-22T02:50:39.624173Z",
"url": "https://files.pythonhosted.org/packages/c0/cd/82cefeaddc54bd2ff11de77ee11242da13841d73e9d60a99f74f33bf82be/clict-0.5.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-22 02:50:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hoefkensj",
"github_project": "Clict",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "clict"
}