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 | 🐍 PyPi
Install
# via pip
pip install xsentinels
# via poetry
poetry add xsentinels
Quick Start
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.
Release files for xsentinels 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xsentinels-1.3.1.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xsentinels-1.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / xsentinels-1.3.1.tar.gz
| Download URL | xsentinels-1.3.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65e857643a0237296346c468a6762d242b2f3a970cc93aa0325127aba89a789a
|
|
BLAKE2b-256 checksum How to use checksums |
b3a2420de554d9fd3670561e171415a2bd5fcd97d72d0ca68b9abb0942ded1ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-1020-azure
|
Release files / xsentinels-1.3.1-py3-none-any.whl
| Download URL | xsentinels-1.3.1-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3a68cb3e070cdd00c61856f20f3fc9c2df0339f0ad0e621a4ba2a07e023e6a2
|
|
BLAKE2b-256 checksum How to use checksums |
2da54eaa5dc8d9e7dc575ec8289136e3fd943734a12cc88b93a2ce4dcae6a56e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-1020-azure
|