Skip to main content

Angets (Ankha's Gets): Functions for user input.

Project description

Angets (Ankha's Gets): Functions for user input.

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.10.x or newer.

Installation

pip install angets

Usage

Import Module.

import angets

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

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.

input1 = angets.get_constrained_float(
    wihtin=(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.

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!

Changes

Created:

  • 19 February 2025.

Revised:

  • 21 February 2025.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

angets-0.0.1rc0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

angets-0.0.1rc0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file angets-0.0.1rc0.tar.gz.

File metadata

  • Download URL: angets-0.0.1rc0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for angets-0.0.1rc0.tar.gz
Algorithm Hash digest
SHA256 40de8edc822c9caadfb369e5ce1f3c22c8b3dc140e5e8c8cae99a26849a28e58
MD5 84a2b2311c6e9790624417612bb513c8
BLAKE2b-256 6bd5436fd9972e985e9c1a019a822d5dc8e08f42867e7fcd5a79b8eca1c614d0

See more details on using hashes here.

File details

Details for the file angets-0.0.1rc0-py3-none-any.whl.

File metadata

  • Download URL: angets-0.0.1rc0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for angets-0.0.1rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 a395a89a9d96cc4ea73bcf4d60e6f87ac613b636da202bfc376e12db5ffa7802
MD5 0b83c92711f1125c66de5fea6beff3a8
BLAKE2b-256 8cc8320927bf2ed0fc6395e3d92bd50e03b47a7fc832ee623ed45aa4fe2a555b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page