An open API service indexing awesome lists of open source software.

https://github.com/andrewpetrochenkov/dict.py

:snake: dict replacement
https://github.com/andrewpetrochenkov/dict.py

python

Last synced: about 2 months ago
JSON representation

:snake: dict replacement

Awesome Lists containing this project

README

        

[![](https://img.shields.io/pypi/v/dict.svg?maxAge=3600)](https://pypi.org/project/dict/)
[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)
[![](https://github.com/andrewp-as-is/dict.py/workflows/tests42/badge.svg)](https://github.com/andrewp-as-is/dict.py/actions)

### Installation
```bash
$ [sudo] pip install dict
```

#### Features
* **attribute-style access**
* **None** instead of **KeyError**
* safe **remove**
* jQuery like **methods chaining**

#### Examples
```python
>>> from dict import dict

>>> dict(k="v")["k"]
"v"

>>> dict(k="v").k
"v"

>>> dict(k="v")["not_existing"]
None

>>> dict(k="v").not_existing
None

>>> dict(k="v").get("K",i=True) # case insensitive
```


readme42.com