🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

inputx

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inputx

`inputx` is a Python module that provides an advanced input function with various validation options.

pipPyPI
Version
1.0.3
Maintainers
1

INPUTX

inputx is a Python module that provides an advanced input function with various validation options. It allows you to get user input in a flexible and secure way, supporting data types like int, float, and str, as well as restrictions on the types of characters allowed (e.g., only English letters, digits, symbols, etc.).

Features

  • Data type validation: Ensures input is of type int, float, or str.
  • Invisible input: Can hide user input (useful for passwords).
  • Character restrictions: Restrict input to specific sets of characters, such as:
    • Only English letters (a-z, A-Z)
    • Only Russian letters (а-я, А-ĐŻ)
    • Only digits (0-9)
    • Only symbols (e.g., !@#$%^&*)

Supported Platforms

Currently, this module supports only Windows operating system, because it using msvcrt for capturing user input. Other platforms (e.g., Linux, macOS) are not yet supported.

Installation

To install the package, use GIT:

git clone https://github.com/KonstantinDigital/Inputx.git

Or install directly from PyPI:

pip install inputx

USAGE

Basic Example

from inputx import inputx

# Get an integer input
age = inputx("Enter your age: ", data_type="int")
print(f"Your age is: {age}")

# Get a float input
price = inputx("Enter the price: ", data_type="float")
print(f"Price: {price}")

# Get a password (invisible input)
password = inputx("Enter your password: ", invisible_input=True)
print("Password entered successfully.")

Restrictions

You can use restrictions to limit the types of characters users can enter.

from inputx import inputx

# Only accept English letters
name = inputx("Enter your name: ", only_en_letters=True)

# Only accept digits and symbols
phone = inputx("Enter your phone number: ", only_digitals=True, only_symbols=True)

# Only accept symbols
symbols = inputx("Enter some symbols: ", only_symbols=True)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

inputx

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts