Skip to main content

optionaldict

Build Status Build status Coverage Status

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:

pip install optionaldict

Usage

optionaldict's usage is very simple, you will import it by:

from optionaldict import optionaldict

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

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:

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
})

Metadata

Release files for optionaldict 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for optionaldict 0.1.2
File Size Uploaded Provenance Actions
optionaldict-0.1.2.tar.gz 3.5 kB Without provenance Details for optionaldict-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for optionaldict 0.1.2
File Interpreter ABI Platform Actions
optionaldict-0.1.2-py2.py3-none-any.whl Python 2, Python 3 none any Details for optionaldict-0.1.2-py2.py3-none-any.whl

Total release size: 7.2 kB

Release files / optionaldict-0.1.2.tar.gz

Download URL optionaldict-0.1.2.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
175b62ee8259af703def42e0b44b413ea55e7b0732456cb2fd5cbbc998605966
BLAKE2b-256 checksum
How to use checksums
ad8bcb72b1d40d21963ad1923ce529ae1f9ba49a13c18c7e6c47081c3dc1211f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.16

Release files / optionaldict-0.1.2-py2.py3-none-any.whl

Download URL optionaldict-0.1.2-py2.py3-none-any.whl
Size 3.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
278d9b79b3d6a55b1b8ff5f9017bff6383a33426348d09e699ff50162bbcdab7
BLAKE2b-256 checksum
How to use checksums
93c2408eb8d1ddacc36c6c31e0b0640b8493a4b3e88e26670bdd2b3a8ad7d704
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.16

Security for optionaldict 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page