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

Uploaded Python 3

File details

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

File metadata

  • Download URL: angets-0.1.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for angets-0.1.0.tar.gz
Algorithm Hash digest
SHA256 48f0ee9c7dde0a178a5314f4825cdaba11f7b3fb83666092ff8c979cc97553e5
MD5 01a700269ec892446542aedbf0854c15
BLAKE2b-256 e8f68322063e19546cba6cdb030ee9210d20512d7c13a995db9479c6d080457a

See more details on using hashes here.

Provenance

The following attestation bundles were made for angets-0.1.0.tar.gz:

Publisher: publish.yaml on FirstlyBoldly/Angets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: angets-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for angets-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73bbff123f67876b07a6f72ec6709ffdefb6c7b83fe1bf75fd87c7d6ff8cee8e
MD5 3a3496d6012d93a2cc0955787fc5ae88
BLAKE2b-256 94a8063d5f99589be19289ca3ce76c1ee5b0c866bbd1a77144b0e4879852443c

See more details on using hashes here.

Provenance

The following attestation bundles were made for angets-0.1.0-py3-none-any.whl:

Publisher: publish.yaml on FirstlyBoldly/Angets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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