Metadata-Version: 2.3
Name: xsentinels
Version: 1.3.1
Summary: Sentinels for Defaults, Null and for creating sentinels/singletons.
Keywords: singleton,type,guards,sentinels,sentinel,default,null
Author: Josh Orr
Author-email: josh@orr.blue
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: typing-inspect (>=0,<1)
Project-URL: Repository, https://github.com/xyngular/py-xsentinels
Description-Content-Type: text/markdown

![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.10|%203.11|%203.12|%203.13&color=blue?style=flat-square&logo=python)
![PyPI version](https://badge.fury.io/py/xsentinels.svg?)



# Overview

Various objects that allow for sentinel-like singletons for various purposes, including:

- Ones pre-defined in this library:
  - Default
  - Null
- Also, Easily create your own custom singletons/sentinels types.

**[📄 Detailed Documentation](https://xyngular.github.io/py-xsentinels/latest/)** | **[🐍 PyPi](https://pypi.org/project/xsentinels/)**

# Install

```bash
# via pip
pip install xsentinels

# via poetry
poetry add xsentinels
```

# Quick Start

```python
from xsentinels import Default
import os

def my_func(my_param = Default):
    if my_param is Default:
        # Resolve default value for parameter, otherwise None.
        my_param = os.environ.get('MY_PARAM', None)
    ...
```

# Licensing

This library is licensed under the MIT-0 License. See the LICENSE file.

