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(
    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.

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.2.2.tar.gz (6.7 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.2.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file angets-0.0.2.2.tar.gz.

File metadata

  • Download URL: angets-0.0.2.2.tar.gz
  • Upload date:
  • Size: 6.7 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.2.2.tar.gz
Algorithm Hash digest
SHA256 d46f33f613bfa73894ad8038c1eabaa572bc3b2f789c19d9c936573113e4f7a2
MD5 675a4cba214a777bc937b24375579379
BLAKE2b-256 795f356abfceeeb3bc3ead6c4a9d444d2fe30cf2340d71fe7383690fa71258d4

See more details on using hashes here.

File details

Details for the file angets-0.0.2.2-py3-none-any.whl.

File metadata

  • Download URL: angets-0.0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 7.0 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.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f8c0c8f7d34e3c84a768c0a76f797368647115a27ea14930d91556cbe13e57f
MD5 91b315c50c9d28a8d10f500e2fef2430
BLAKE2b-256 67f8c9eebe9d8fc05dc9cd52f29c0a624ee0123a799d35ef4bd81518b784b2fb

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