angets


Nameangets JSON
Version 0.1.5 PyPI version JSON
download
home_pageNone
SummaryAngets (Ankha's Gets): Functions for user input.
upload_time2025-02-26 14:25:15
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords ankha's greens user input gets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Angets (Ankha's Gets): Functions for user input.

![Tests](https://github.com/FirstlyBoldly/Angets/actions/workflows/tests.yaml/badge.svg)
[![PyPI](https://img.shields.io/pypi/pyversions/angets.svg)](https://pypi.org/project/angets/)
[![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT)

Ever get tired of fine-tuning user input?
\
Well, this is the package for you!
\
At least it is for me since I made the whole thing in the first place...

## Prerequisites

Python 3.11.x or newer.

## Installation

`pip install angets`

## Usage

Import Module.

```python
import angets
```

Basic usage, One attempt with a prompt to the user.

```python
input0 = angets.get_non_empty_string('Give me a response! ')
```

To get inputs with a bit more control.
> Remember to set `verbose` to True as no warning will be conveyed to the user otherwise.

```python
input1 = angets.get_constrained_float(
    within=(6, 9),
    interval='[]',
    prompt='Now give me a number within said range!',
    warning="Oops! Not within the bounds I'm afraid...",
    verbose=True,
    attempts=10
)
```

That is the gist of the main features.
\
It should be a useful utility tool to mitigate against invalid user inputs.

## <img src="/assets/images/troll_face.png" alt="Troll Face" style="height: 24px; width: 24px;" /> Problem?

Actually, I don't expect anyone else other than me to use this package.
\
But if you find it useful enough to want to contribute, be my guest!

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "angets",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "Ankhbold Batbaatar <ankhasgreens@gmail.com>",
    "keywords": "Ankha's Greens, user input, gets",
    "author": null,
    "author_email": "Ankhbold Batbaatar <ankhasgreens@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/a5/2c/64df253709ee86c08a429521e84d2ae3cb40dbb9297013c5391d52866da0/angets-0.1.5.tar.gz",
    "platform": null,
    "description": "# Angets (Ankha's Gets): Functions for user input.\n\n![Tests](https://github.com/FirstlyBoldly/Angets/actions/workflows/tests.yaml/badge.svg)\n[![PyPI](https://img.shields.io/pypi/pyversions/angets.svg)](https://pypi.org/project/angets/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT)\n\nEver get tired of fine-tuning user input?\n\\\nWell, this is the package for you!\n\\\nAt least it is for me since I made the whole thing in the first place...\n\n## Prerequisites\n\nPython 3.11.x or newer.\n\n## Installation\n\n`pip install angets`\n\n## Usage\n\nImport Module.\n\n```python\nimport angets\n```\n\nBasic usage, One attempt with a prompt to the user.\n\n```python\ninput0 = angets.get_non_empty_string('Give me a response! ')\n```\n\nTo get inputs with a bit more control.\n> Remember to set `verbose` to True as no warning will be conveyed to the user otherwise.\n\n```python\ninput1 = angets.get_constrained_float(\n    within=(6, 9),\n    interval='[]',\n    prompt='Now give me a number within said range!',\n    warning=\"Oops! Not within the bounds I'm afraid...\",\n    verbose=True,\n    attempts=10\n)\n```\n\nThat is the gist of the main features.\n\\\nIt should be a useful utility tool to mitigate against invalid user inputs.\n\n## <img src=\"/assets/images/troll_face.png\" alt=\"Troll Face\" style=\"height: 24px; width: 24px;\" /> Problem?\n\nActually, I don't expect anyone else other than me to use this package.\n\\\nBut if you find it useful enough to want to contribute, be my guest!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Angets (Ankha's Gets): Functions for user input.",
    "version": "0.1.5",
    "project_urls": {
        "Homepage": "https://github.com/FirstlyBoldly/Angets",
        "Issues": "https://github.com/FirstlyBoldly/Angets/issues"
    },
    "split_keywords": [
        "ankha's greens",
        " user input",
        " gets"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6cb6f2275bbccafaf44ac0cbacc384e5f8ce921ea887f484f7bdbd83ca711d8a",
                "md5": "30851695982c6ba47fa1e6bc24332caa",
                "sha256": "864d1121a75e6882c9e9675f2875b1faff2003b75cdb6f5afc91ca65ad81dcf8"
            },
            "downloads": -1,
            "filename": "angets-0.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "30851695982c6ba47fa1e6bc24332caa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 7368,
            "upload_time": "2025-02-26T14:25:13",
            "upload_time_iso_8601": "2025-02-26T14:25:13.037320Z",
            "url": "https://files.pythonhosted.org/packages/6c/b6/f2275bbccafaf44ac0cbacc384e5f8ce921ea887f484f7bdbd83ca711d8a/angets-0.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a52c64df253709ee86c08a429521e84d2ae3cb40dbb9297013c5391d52866da0",
                "md5": "a9df0b5e81f6d47fb835d5146f7a46da",
                "sha256": "aed8bd9be6c75c869c42e000d0d3d855f5ba446feea5ccfa68ef75f391ba9c00"
            },
            "downloads": -1,
            "filename": "angets-0.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "a9df0b5e81f6d47fb835d5146f7a46da",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 8201,
            "upload_time": "2025-02-26T14:25:15",
            "upload_time_iso_8601": "2025-02-26T14:25:15.341406Z",
            "url": "https://files.pythonhosted.org/packages/a5/2c/64df253709ee86c08a429521e84d2ae3cb40dbb9297013c5391d52866da0/angets-0.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-26 14:25:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "FirstlyBoldly",
    "github_project": "Angets",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "angets"
}
        
Elapsed time: 1.90034s