xsentinels


Namexsentinels JSON
Version 1.3.1 PyPI version JSON
download
home_pagehttps://github.com/xyngular/py-xsentinels
SummarySentinels for Defaults, Null and for creating sentinels/singletons.
upload_time2025-01-30 20:17:06
maintainerNone
docs_urlNone
authorJosh Orr
requires_python<4.0,>=3.10
licenseNone
keywords singleton type guards sentinels sentinel default null
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/xyngular/py-xsentinels",
    "name": "xsentinels",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "singleton, type, guards, sentinels, sentinel, default, null",
    "author": "Josh Orr",
    "author_email": "josh@orr.blue",
    "download_url": "https://files.pythonhosted.org/packages/b3/a2/420de554d9fd3670561e171415a2bd5fcd97d72d0ca68b9abb0942ded1ae/xsentinels-1.3.1.tar.gz",
    "platform": null,
    "description": "![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)\n![PyPI version](https://badge.fury.io/py/xsentinels.svg?)\n\n\n\n# Overview\n\nVarious objects that allow for sentinel-like singletons for various purposes, including:\n\n- Ones pre-defined in this library:\n  - Default\n  - Null\n- Also, Easily create your own custom singletons/sentinels types.\n\n**[\ud83d\udcc4 Detailed Documentation](https://xyngular.github.io/py-xsentinels/latest/)** | **[\ud83d\udc0d PyPi](https://pypi.org/project/xsentinels/)**\n\n# Install\n\n```bash\n# via pip\npip install xsentinels\n\n# via poetry\npoetry add xsentinels\n```\n\n# Quick Start\n\n```python\nfrom xsentinels import Default\nimport os\n\ndef my_func(my_param = Default):\n    if my_param is Default:\n        # Resolve default value for parameter, otherwise None.\n        my_param = os.environ.get('MY_PARAM', None)\n    ...\n```\n\n# Licensing\n\nThis library is licensed under the MIT-0 License. See the LICENSE file.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Sentinels for Defaults, Null and for creating sentinels/singletons.",
    "version": "1.3.1",
    "project_urls": {
        "Homepage": "https://github.com/xyngular/py-xsentinels",
        "Repository": "https://github.com/xyngular/py-xsentinels"
    },
    "split_keywords": [
        "singleton",
        " type",
        " guards",
        " sentinels",
        " sentinel",
        " default",
        " null"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2da54eaa5dc8d9e7dc575ec8289136e3fd943734a12cc88b93a2ce4dcae6a56e",
                "md5": "ba89a990fc82452e84c762427eccbdc0",
                "sha256": "f3a68cb3e070cdd00c61856f20f3fc9c2df0339f0ad0e621a4ba2a07e023e6a2"
            },
            "downloads": -1,
            "filename": "xsentinels-1.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ba89a990fc82452e84c762427eccbdc0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 7385,
            "upload_time": "2025-01-30T20:17:03",
            "upload_time_iso_8601": "2025-01-30T20:17:03.930758Z",
            "url": "https://files.pythonhosted.org/packages/2d/a5/4eaa5dc8d9e7dc575ec8289136e3fd943734a12cc88b93a2ce4dcae6a56e/xsentinels-1.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b3a2420de554d9fd3670561e171415a2bd5fcd97d72d0ca68b9abb0942ded1ae",
                "md5": "9058b4d6402a2d55f831c4023b47d7c6",
                "sha256": "65e857643a0237296346c468a6762d242b2f3a970cc93aa0325127aba89a789a"
            },
            "downloads": -1,
            "filename": "xsentinels-1.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9058b4d6402a2d55f831c4023b47d7c6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 5657,
            "upload_time": "2025-01-30T20:17:06",
            "upload_time_iso_8601": "2025-01-30T20:17:06.409825Z",
            "url": "https://files.pythonhosted.org/packages/b3/a2/420de554d9fd3670561e171415a2bd5fcd97d72d0ca68b9abb0942ded1ae/xsentinels-1.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-30 20:17:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xyngular",
    "github_project": "py-xsentinels",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "xsentinels"
}
        
Elapsed time: 6.62406s