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.

Troll Face 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.
    1. Fixed the installation command.
    2. Added a new image.

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.3.tar.gz (6.9 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.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: angets-0.0.2.3.tar.gz
  • Upload date:
  • Size: 6.9 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.3.tar.gz
Algorithm Hash digest
SHA256 0da65e87720eae7a626c8b9ea7bade838cac850f5be587fff0e23b46f27e1fb3
MD5 308272bb246b3ac47f6a2f1f2bdc4553
BLAKE2b-256 190bf401bdb05a96e5cead5643c615037668915c6a391e5c7c558b8ade511735

See more details on using hashes here.

File details

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

File metadata

  • Download URL: angets-0.0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 7.1 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 50f278739b1bf41f08c1a0cc0335bd124795f074120ed0cc9e84830505e47f26
MD5 8d5dd06050d3013cd53211094a55ce8f
BLAKE2b-256 3d8a894b22c4335661a780e3c28fcdc292611cbda3995ee3b793ed4521888682

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