A dict-like object that ignore NoneType values for Python
Project description
# optionaldict
``optionaldict`` is a dict-like object that ignore NoneType values for Python which is pickable and JSON serializable.
# Installation
You can install ``optionaldict`` simply using ``pip``:
```bash
pip install optionaldict
```
# Usage
``optionaldict``'s usage is very simple, you will import it:
```python
from optionaldict import optionaldict
```
then use it just like the built-in ``dict``:
```python
d1 = optionaldict(a=1, b=None)
d1['c'] = 2
d1.setdefault('d', None)
d2 = optionaldict()
d2['a'] = 1
d2['b'] = None
```
``optionaldict`` is a dict-like object that ignore NoneType values for Python which is pickable and JSON serializable.
# Installation
You can install ``optionaldict`` simply using ``pip``:
```bash
pip install optionaldict
```
# Usage
``optionaldict``'s usage is very simple, you will import it:
```python
from optionaldict import optionaldict
```
then use it just like the built-in ``dict``:
```python
d1 = optionaldict(a=1, b=None)
d1['c'] = 2
d1.setdefault('d', None)
d2 = optionaldict()
d2['a'] = 1
d2['b'] = None
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
optionaldict-0.1.0.zip
(6.0 kB
view hashes)
optionaldict-0.1.0.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for optionaldict-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 022e4dc1bdf272384ca2aef2da3c6681b17d82a0e3fa65687c46e101dd4d754d |
|
MD5 | a380db03acaa061d6c55d082a569de54 |
|
BLAKE2b-256 | ad431800d43767c53ccf3bf405ecdc68ce0d936da751869b9230e75c71c82509 |