12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- Metadata-Version: 2.0
- Name: optionaldict
- Version: 0.1.1
- Summary: A dict-like object that ignore NoneType values for Python
- Home-page: https://github.com/messense/optionaldict
- Author: messense
- Author-email: messense@icloud.com
- License: UNKNOWN
- Keywords: dict,optional value
- Platform: UNKNOWN
- Classifier: Development Status :: 4 - Beta
- Classifier: License :: OSI Approved :: MIT License
- Classifier: Operating System :: MacOS
- Classifier: Operating System :: POSIX
- Classifier: Operating System :: POSIX :: Linux
- Classifier: Programming Language :: Python
- Classifier: Programming Language :: Python :: 2.6
- Classifier: Programming Language :: Python :: 2.7
- Classifier: Programming Language :: Python :: 3.2
- Classifier: Programming Language :: Python :: 3.3
- Classifier: Programming Language :: Python :: 3.4
- Classifier: Programming Language :: Python :: Implementation :: CPython
- Classifier: Programming Language :: Python :: Implementation :: PyPy
- Classifier: Intended Audience :: Developers
- Classifier: Topic :: Software Development :: Libraries
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
- Classifier: Topic :: Utilities
- # optionaldict
- [](https://travis-ci.org/messense/optionaldict)
- [](https://coveralls.io/r/messense/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
- ```
|