sentinels
Various objects to denote special meanings in python
Decision gist · record as of 2026-08-14
Yes. Sentinels solves a real, recurring design problem with zero dependencies and minimal code. The package is stable, permissively licensed, and widely downloaded. Maintenance is infrequent but the codebase is small and mature—there is little reason for frequent updates. Install it when you need to distinguish 'not provided' from None in your function signatures or conditionals.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low friction: pure Python wheel with no runtime dependencies.
- Maintenance is aging—last release was 367 days ago and the repository shows minimal recent activity, though it remains unarchived and the package is stable enough that infrequent updates may reflect maturity rather than abandonment.
License · maintenance · safety
BSD 3-Clause License (permissive) — BSD 3-Clause License (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2025-08-12 (367 days) · last repo commit 2026-01-26 · 9 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 8,015,144 downloads/mo, #1,672 on PyPI
Alternatives
Verify before relying
pip install sentinels
from sentinels import NOTHING
def get_or_raise(d, key, default=NOTHING):
result = d.get(key, default)
if result is NOTHING:
raise KeyError(key)
return result- Whether the package is actively maintained or in stable-maintenance mode—last commit was recent but release cadence is infrequent.
- Real-world adoption patterns and whether 8M monthly downloads reflect active use or transitive dependency chains.
What it is and what it does
Sentinels is a minimal utility that provides singleton sentinel objects—special placeholder values distinct from None, False, or any other Python value. The primary use case is solving a common design problem: when None is a valid data value in your code (e.g., a dictionary value or function return), you need a different marker to represent 'no value provided' or 'missing'. The package exports a pre-built NOTHING sentinel and a Sentinel class for creating custom ones. Sentinels are identity-based (compared with `is`), pickle-safe, and copy-safe—deepcopy and pickle.loads both return the same singleton object.
The package has no runtime dependencies and is pure Python, making it trivial to install. It supports Python 3.9 through 3.13. The typical pattern is to use a sentinel as a function default argument, then check identity in the function body to distinguish between 'no argument provided' and 'None was explicitly passed'. This is especially useful in wrapper classes, optional-argument APIs, and anywhere None carries semantic meaning.
Use it for
- Implement optional-argument methods where None is a valid value and you need to distinguish 'not provided' from 'explicitly None'.
- Wrap dictionaries or other data structures with methods that raise on missing keys only when no default was given.
- Create guard values in configuration or state machines where you need distinct markers beyond True/False/None.
- Design library APIs that accept None as a meaningful input but need an internal 'unset' marker.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Sentinels solves a real, recurring design problem with zero dependencies and minimal code. The package is stable, permissively licensed, and widely downloaded. Maintenance is infrequent but the codebase is small and mature—there is little reason for frequent updates. Install it when you need to distinguish 'not provided' from None in your function signatures or conditionals.
Install
sentinels on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance is aging—last release was 367 days ago and the repository shows minimal recent activity, though it remains unarchived and the package is stable enough that infrequent updates may reflect maturity rather than abandonment.
Requires Python 3.9 or later.
License in practice
BSD 3-Clause License (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install sentinels
from sentinels import NOTHING
def get_or_raise(d, key, default=NOTHING):
result = d.get(key, default)
if result is NOTHING:
raise KeyError(key)
return result
Verify before relying
- Whether the package is actively maintained or in stable-maintenance mode—last commit was recent but release cadence is infrequent.
- Real-world adoption patterns and whether 8M monthly downloads reflect active use or transitive dependency chains.
Package facts
| License | BSD 3-Clause License permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 367 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,015,144 / month, #1,672 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9 |
Evidence: sentinels-1.1.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “placeholder values no dependencies”
- sentinelsProvides singleton sentinel objects with special meanings—distinct…
- nulltypeDefines custom null and sentinel values that behave like empty…
- niltypeProvides a `Nil` singleton object to represent missing or undefined…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also sentinel · niltype · nulltype · Redis-Sentinel-Url · func_args · pyjon.utils · django-solo · sentinelhub · redis-cli · iterators