xsentinels


Namexsentinels JSON
Version 1.2.2 PyPI version JSON
download
home_pagehttps://github.com/xyngular/py-xsentinels
SummarySentinels for Defaults, Null and for creating sentinels/singletons.
upload_time2023-04-15 14:12:06
maintainer
docs_urlNone
authorJosh Orr
requires_python>=3.8,<4.0
license
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.8|%203.9|%203.10&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": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "singleton,type,guards,sentinels,sentinel,default,null",
    "author": "Josh Orr",
    "author_email": "josh@orr.blue",
    "download_url": "https://files.pythonhosted.org/packages/63/0f/490ee44f66935e6f450687aca8bea90ae2d34ecdd86311bc60baae35ce12/xsentinels-1.2.2.tar.gz",
    "platform": null,
    "description": "![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.8|%203.9|%203.10&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": "",
    "summary": "Sentinels for Defaults, Null and for creating sentinels/singletons.",
    "version": "1.2.2",
    "split_keywords": [
        "singleton",
        "type",
        "guards",
        "sentinels",
        "sentinel",
        "default",
        "null"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d8fdf3107d499adb7e60ef62fd170490a34695154f7f3d5b23de36677a540f13",
                "md5": "72351a92bbe48e121eadbb3cfa35057e",
                "sha256": "21e65b5aff07976056897ef44d58ace700070d00cb2450fc5b3d139683a59a0a"
            },
            "downloads": -1,
            "filename": "xsentinels-1.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "72351a92bbe48e121eadbb3cfa35057e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 7182,
            "upload_time": "2023-04-15T14:12:05",
            "upload_time_iso_8601": "2023-04-15T14:12:05.025990Z",
            "url": "https://files.pythonhosted.org/packages/d8/fd/f3107d499adb7e60ef62fd170490a34695154f7f3d5b23de36677a540f13/xsentinels-1.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "630f490ee44f66935e6f450687aca8bea90ae2d34ecdd86311bc60baae35ce12",
                "md5": "c9fb6a3f39d9755cfc34235d5ca16105",
                "sha256": "d40517c690e11902b5ffee12062e6ccabebc2cd99e66e3ab5dd61cc9e25a2788"
            },
            "downloads": -1,
            "filename": "xsentinels-1.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c9fb6a3f39d9755cfc34235d5ca16105",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 5835,
            "upload_time": "2023-04-15T14:12:06",
            "upload_time_iso_8601": "2023-04-15T14:12:06.813431Z",
            "url": "https://files.pythonhosted.org/packages/63/0f/490ee44f66935e6f450687aca8bea90ae2d34ecdd86311bc60baae35ce12/xsentinels-1.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-15 14:12:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "xyngular",
    "github_project": "py-xsentinels",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "xsentinels"
}
        
Elapsed time: 0.06001s