Skip to main content

Python Optional

Returns None if a dict key does not exist

Install

pip install python_optional

Usage

from python_optional import optional

data = {
    'a' : 'b'
}

result = optional(data).get('a') # 'b'
result = optional(data).get('z') # None

Metadata

Release files for python-optional 1.0.0

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

Source distribution (sdist)

Source distribution for python-optional 1.0.0
File Size Uploaded Provenance Actions
python_optional-1.0.0.tar.gz 2.4 kB Without provenance Details for python_optional-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-optional 1.0.0
File Interpreter ABI Platform Actions
python_optional-1.0.0-py3-none-any.whl Python 3 none any Details for python_optional-1.0.0-py3-none-any.whl

Total release size: 5.1 kB

Release files / python_optional-1.0.0.tar.gz

Download URL python_optional-1.0.0.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ab0f8435a880414fafae6b84a8db3b35f3251c42e665c569d076dc753ab92e44
BLAKE2b-256 checksum
How to use checksums
d4e004a1791e2ed97d79e979d06249fc137bbc19efbe988cb71b661460221ee8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

Release files / python_optional-1.0.0-py3-none-any.whl

Download URL python_optional-1.0.0-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f67da420e835535306e52757d8aa7f48e09fed86ee7353cb18aa53db7e6853ec
BLAKE2b-256 checksum
How to use checksums
c079a17fbf90ef7dec3644d0a34acbc17bff6ed91311b9d7aa2ad0771df5b5bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

Security for python-optional 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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