optionaldict


Nameoptionaldict JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/messense/optionaldict
SummaryA dict-like object that ignore NoneType values for Python
upload_time2021-01-15 07:52:20
maintainer
docs_urlNone
authormessense
requires_python
license
keywords dict optional value
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # optionaldict

[![Build Status](https://travis-ci.org/messense/optionaldict.svg)](https://travis-ci.org/messense/optionaldict)
[![Build status](https://ci.appveyor.com/api/projects/status/qkj8q2cuitihj2dx/branch/master?svg=true)](https://ci.appveyor.com/project/messense/optionaldict/branch/master)
[![Coverage Status](https://coveralls.io/repos/messense/optionaldict/badge.svg)](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 by:

```python
from optionaldict import optionaldict
```

or if you prefer the CamelCasing style naming, you can import it by:

```python
from optionaldict import OptionalDict
```

> Tips: In fact, ``optionaldict`` is just an alias for ``OptionalDict``.

Then you can 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

d3 = optionaldict({
    'a': 1,
    'b': None
})
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/messense/optionaldict",
    "name": "optionaldict",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "dict,optional value",
    "author": "messense",
    "author_email": "messense@icloud.com",
    "download_url": "https://files.pythonhosted.org/packages/ad/8b/cb72b1d40d21963ad1923ce529ae1f9ba49a13c18c7e6c47081c3dc1211f/optionaldict-0.1.2.tar.gz",
    "platform": "",
    "description": "# optionaldict\n\n[![Build Status](https://travis-ci.org/messense/optionaldict.svg)](https://travis-ci.org/messense/optionaldict)\n[![Build status](https://ci.appveyor.com/api/projects/status/qkj8q2cuitihj2dx/branch/master?svg=true)](https://ci.appveyor.com/project/messense/optionaldict/branch/master)\n[![Coverage Status](https://coveralls.io/repos/messense/optionaldict/badge.svg)](https://coveralls.io/r/messense/optionaldict)\n\n``optionaldict`` is a dict-like object that ignore NoneType values for Python which is pickable and JSON serializable.\n\n# Installation\n\nYou can install ``optionaldict`` simply using ``pip``:\n```bash\npip install optionaldict\n```\n\n# Usage\n``optionaldict``'s usage is very simple, you will import it by:\n\n```python\nfrom optionaldict import optionaldict\n```\n\nor if you prefer the CamelCasing style naming, you can import it by:\n\n```python\nfrom optionaldict import OptionalDict\n```\n\n> Tips: In fact, ``optionaldict`` is just an alias for ``OptionalDict``.\n\nThen you can use it just like the built-in ``dict``:\n\n```python\nd1 = optionaldict(a=1, b=None)\nd1['c'] = 2\nd1.setdefault('d', None)\n\nd2 = optionaldict()\nd2['a'] = 1\nd2['b'] = None\n\nd3 = optionaldict({\n    'a': 1,\n    'b': None\n})\n```\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A dict-like object that ignore NoneType values for Python",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/messense/optionaldict"
    },
    "split_keywords": [
        "dict",
        "optional value"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "93c2408eb8d1ddacc36c6c31e0b0640b8493a4b3e88e26670bdd2b3a8ad7d704",
                "md5": "8c3663294097f28a14adf4b422cb78ac",
                "sha256": "278d9b79b3d6a55b1b8ff5f9017bff6383a33426348d09e699ff50162bbcdab7"
            },
            "downloads": -1,
            "filename": "optionaldict-0.1.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8c3663294097f28a14adf4b422cb78ac",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 3756,
            "upload_time": "2021-01-15T07:52:18",
            "upload_time_iso_8601": "2021-01-15T07:52:18.690896Z",
            "url": "https://files.pythonhosted.org/packages/93/c2/408eb8d1ddacc36c6c31e0b0640b8493a4b3e88e26670bdd2b3a8ad7d704/optionaldict-0.1.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad8bcb72b1d40d21963ad1923ce529ae1f9ba49a13c18c7e6c47081c3dc1211f",
                "md5": "421af5fc122af0be9399d825d3793cae",
                "sha256": "175b62ee8259af703def42e0b44b413ea55e7b0732456cb2fd5cbbc998605966"
            },
            "downloads": -1,
            "filename": "optionaldict-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "421af5fc122af0be9399d825d3793cae",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3454,
            "upload_time": "2021-01-15T07:52:20",
            "upload_time_iso_8601": "2021-01-15T07:52:20.311952Z",
            "url": "https://files.pythonhosted.org/packages/ad/8b/cb72b1d40d21963ad1923ce529ae1f9ba49a13c18c7e6c47081c3dc1211f/optionaldict-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-01-15 07:52:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "messense",
    "github_project": "optionaldict",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "appveyor": true,
    "tox": true,
    "lcname": "optionaldict"
}
        
Elapsed time: 0.51639s