Skip to main content

Python Optional

Quality Gate Status Maintainability Rating

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).a # 'b'

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

Metadata

Release files for python-optional 1.1.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.1.0
File Size Uploaded
python_optional-1.1.0.tar.gz 2.5 kB Details

Built distribution (wheel)

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

Total release size: 5.3 kB

Release files / python_optional-1.1.0.tar.gz

Download URL python_optional-1.1.0.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
97b93c473452c4efc1fd8e1ac96cadc324b86c9ed02ef162e2b8d3a13dd7cb8b
BLAKE2b-256 checksum
How to use checksums
efa8b03a0a2bad8c5cf141ca0ccf26f905181036049fb00cf56a37499b80501e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

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

Download URL python_optional-1.1.0-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef3d7d159f512964698a4aa8e5720427b87f6e5ba676cec593fb6e75f7d92fdc
BLAKE2b-256 checksum
How to use checksums
648a1fcf3540c018092e45e49f014fa566e9493cf8972f6d035b3d802d7e8bfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

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