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 details)
optionaldict-0.1.0.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file optionaldict-0.1.0.zip
.
File metadata
- Download URL: optionaldict-0.1.0.zip
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcd0aed27c425f179ff887b0df6b31e4fdce9081715d48be1399ffd4ed12dfeb |
|
MD5 | ec784bf0c7ffc7155add128e333a661e |
|
BLAKE2b-256 | e97384661bcf2286def68030970c5ea1c7b27f5bb3a22025c1c2ff35115ccc11 |
File details
Details for the file optionaldict-0.1.0.tar.gz
.
File metadata
- Download URL: optionaldict-0.1.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06cf2296ef2fabc62f6590c92894e2c847f27eea2ead74e98965a9c1f7bd800b |
|
MD5 | bdc1520a1d36e88bdcb7ae27d26bd7f4 |
|
BLAKE2b-256 | 9d540c42fb18f861306e88e37298e4b031a23aaad60121974b26489c829c521e |
File details
Details for the file optionaldict-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: optionaldict-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 022e4dc1bdf272384ca2aef2da3c6681b17d82a0e3fa65687c46e101dd4d754d |
|
MD5 | a380db03acaa061d6c55d082a569de54 |
|
BLAKE2b-256 | ad431800d43767c53ccf3bf405ecdc68ce0d936da751869b9230e75c71c82509 |