Skip to main content

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

Project description

Ankha's Gets: Functions for user input.

Tests PyPI License: 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.

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!

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.2.0.tar.gz (8.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.2.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for angets-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e2a08e606e77d1d7ba0c17ea8b7d4b4203df45db8d27abd4e0b8d974670e869d
MD5 7b0a4382519a8e9201f089c9966c860f
BLAKE2b-256 e99835afeed6ed995a0fbf7a24d0e9c184e8292515bace2219d68a0517bc073d

See more details on using hashes here.

Provenance

The following attestation bundles were made for angets-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: angets-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d52a9df307c35da3588dee6b438ce8b7f4d901f1dab79706f00f9c1397660d62
MD5 d9d6eaafbeb407e138e3dcbbdc64c89c
BLAKE2b-256 53bdab158ae6a470321ca4635ee71986f6cf92795b488f6a93af6ed82cee0453

See more details on using hashes here.

Provenance

The following attestation bundles were made for angets-0.2.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