{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/2"}],"enrichment":{"capability":"Provides singleton sentinel objects with special meanings\u2014distinct placeholder values that can be used in function signatures and conditionals where None is a valid data value.","skillfed_tags":["no-dependencies","singleton-pattern"],"use_cases":["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."],"what_it_does":"Sentinels is a minimal utility that provides singleton sentinel objects\u2014special 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\u2014deepcopy and pickle.loads both return the same singleton object.\n\nThe 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.","worth_installing":"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\u2014there is little reason for frequent updates. Install it when you need to distinguish 'not provided' from None in your function signatures or conditionals."},"id":"sentinels","links":{"html":"https://skillfed.io/packages/sentinels","md":"https://skillfed.io/packages/sentinels.md","pypi":"https://pypi.org/project/sentinels/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-08-12","license_spdx":null,"license_treatment":"permissive","name":"sentinels","python_support":"supports_current","summary":"Various objects to denote special meanings in python"},"popularity":{"monthly_downloads":8015144,"position":1672,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.1.1"}
