Skip to main content

sentinel-value

Python package version Tests Status Documentation Status

sentinel-value is a Python package, that helps to create Sentinel Values - special singleton objects, akin to None, NotImplemented and Ellipsis.

It implements the sentinel() function (described by PEP 661), and for advanced cases it also provides the SentinelValue() class (not a part of PEP 661).

Usage example:

from sentinel_value import sentinel

MISSING = sentinel("MISSING")

def get_something(default=MISSING):
    ...
    if default is not MISSING:
        return default
    ...

Or, the same thing, but using the SentinelValue class (slightly more verbose, but allows to have nice type annotations):

from typing import Union
from sentinel_value import SentinelValue

class Missing(SentinelValue):
    pass

MISSING = Missing(__name__, "MISSING")

def get_something(default: Union[str, Missing] = MISSING):
    ...
    if default is not MISSING:
        return default
    ...

Metadata

Release files for sentinel-value 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 sentinel-value 1.0.0
File Size Uploaded Provenance Actions
sentinel-value-1.0.0.tar.gz 7.3 kB Without provenance Details for sentinel-value-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sentinel-value 1.0.0
File Interpreter ABI Platform Actions
sentinel_value-1.0.0-py3-none-any.whl Python 3 none any Details for sentinel_value-1.0.0-py3-none-any.whl

Total release size: 14.3 kB

Release files / sentinel-value-1.0.0.tar.gz

Download URL sentinel-value-1.0.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2ff8e9e303c8f6abb2ad8c6d2615ed5f11061eeda2e51edfd560dc0567de633a
BLAKE2b-256 checksum
How to use checksums
938096226b2523d52d88272bd960271a496ae468bb815180bf8a4c38b63b6390
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.8.1 requests/2.26.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

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

Download URL sentinel_value-1.0.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fab2501cb3f40c412a105b9a93089780c571468963f7bbcd0b5772ecdcfdc8cc
BLAKE2b-256 checksum
How to use checksums
29d0757561b23d945e9f7431306a8dc2e60425115df55cef1d142ab52132e08f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.8.1 requests/2.26.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

Security for sentinel-value 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.

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