Skip to main content

CodeFactor

input_num

Python package - input_num is like input but it only accepts numbers


‎

Installation

  • Windows / macOS

    Run python3 -m pip install input_num

  • Linux

    Run python3 -m pip install input_num

‎

Usage

  • Windows / macOS / Linux

    Add this to your script: import input_num input_num("Enter your age: ")

    ‎ Command scheme: input_num("Question: ", AllowNegativeNumbers, DoesPressingEnterReturnNothing)

    ‎

    • First option: If you want to allow only positive numbers (numbers WITHOUT - at the begining), use input_num("Something", False). False just means Allow negative numbers = False And it is optional argument Default value is True

    • Second option: There is also second option, does pressing enter return "" ? Set it to False to make pressing enter ask you again. Example: input_num("Try pressing enter: ", True, False) - this allows negative numbers and disallows entering nothing. It is optional argument Default value is True

    ‎ ⚠️ If you want to set only second option, set the first option too ⚠️

    Do you want to be reminded to update the package? Run input_num.allow_update() RIGHT AFTER importing the package.

‎

Uninstallation

  • Windows / macOS

    Run python3 -m pip uninstall input_num

  • Linux

    Run python3 -m pip uninstall input_num

‎

FAQ

  • Question

    Answer

‎

Do you like this? Hit that ⭐!
Use the star button as way to show us, that it works
Forks and pull requests are welcome of course

Metadata

Release files for input-num 1.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for input-num 1.1.5
File Size Uploaded
input_num-1.1.5.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for input-num 1.1.5
File Interpreter ABI Platform
input_num-1.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / input_num-1.1.5.tar.gz

Download URL input_num-1.1.5.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ce6cd0146eabf1c7a834da3f21f513a94b554a102ed0153f31fa1bcaa8b71627
BLAKE2b-256 checksum
How to use checksums
f51c1011d796e966898052795f7de52d664398fda6a0b8a732ce520f5164508a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release files / input_num-1.1.5-py3-none-any.whl

Download URL input_num-1.1.5-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfeadc658612c68cd49554d3229df42fdd80674427969160b800439f85423b7d
BLAKE2b-256 checksum
How to use checksums
285b3c7ff05ae0456ad9670ce423dd488f35dd3d41f802565af69b499a3f4470
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release history Release notifications | RSS feed

This release

1.1.5 This release

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page