METADATA 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. Metadata-Version: 2.0
  2. Name: optionaldict
  3. Version: 0.1.1
  4. Summary: A dict-like object that ignore NoneType values for Python
  5. Home-page: https://github.com/messense/optionaldict
  6. Author: messense
  7. Author-email: messense@icloud.com
  8. License: UNKNOWN
  9. Keywords: dict,optional value
  10. Platform: UNKNOWN
  11. Classifier: Development Status :: 4 - Beta
  12. Classifier: License :: OSI Approved :: MIT License
  13. Classifier: Operating System :: MacOS
  14. Classifier: Operating System :: POSIX
  15. Classifier: Operating System :: POSIX :: Linux
  16. Classifier: Programming Language :: Python
  17. Classifier: Programming Language :: Python :: 2.6
  18. Classifier: Programming Language :: Python :: 2.7
  19. Classifier: Programming Language :: Python :: 3.2
  20. Classifier: Programming Language :: Python :: 3.3
  21. Classifier: Programming Language :: Python :: 3.4
  22. Classifier: Programming Language :: Python :: Implementation :: CPython
  23. Classifier: Programming Language :: Python :: Implementation :: PyPy
  24. Classifier: Intended Audience :: Developers
  25. Classifier: Topic :: Software Development :: Libraries
  26. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  27. Classifier: Topic :: Utilities
  28. # optionaldict
  29. [![Build Status](https://travis-ci.org/messense/optionaldict.svg)](https://travis-ci.org/messense/optionaldict)
  30. [![Coverage Status](https://coveralls.io/repos/messense/optionaldict/badge.svg)](https://coveralls.io/r/messense/optionaldict)
  31. ``optionaldict`` is a dict-like object that ignore NoneType values for Python which is pickable and JSON serializable.
  32. # Installation
  33. You can install ``optionaldict`` simply using ``pip``:
  34. ```bash
  35. pip install optionaldict
  36. ```
  37. # Usage
  38. ``optionaldict``'s usage is very simple, you will import it:
  39. ```python
  40. from optionaldict import optionaldict
  41. ```
  42. then use it just like the built-in ``dict``:
  43. ```python
  44. d1 = optionaldict(a=1, b=None)
  45. d1['c'] = 2
  46. d1.setdefault('d', None)
  47. d2 = optionaldict()
  48. d2['a'] = 1
  49. d2['b'] = None
  50. ```