inputx


Nameinputx JSON
Version 1.0.3 PyPI version JSON
download
home_pageNone
Summary`inputx` is a Python module that provides an advanced input function with various validation options.
upload_time2024-11-30 12:29:37
maintainerNone
docs_urlNone
authorKonstantinDigital
requires_python<4.0,>=3.6
licenseMIT
keywords inputx inputs input advanced input custom input enhanced input filtered input secure input password input terminal input interactive input python input character filtering cursor navigation string validation keyboard input real-time input typing text input data validation terminal applications
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://git-scm.com/):

```
git clone https://github.com/KonstantinDigital/Inputx.git
```
Or install directly from [PyPI](https://pypi.org/project/inputx/):

```
pip install inputx

```

## USAGE
### Basic Example
```python
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.
```python
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](https://opensource.org/licenses/MIT) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "inputx",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.6",
    "maintainer_email": null,
    "keywords": "inputx, inputs, input, advanced input, custom input, enhanced input, filtered input, secure input, password input, terminal input, interactive input, Python input, character filtering, cursor navigation, string validation, keyboard input, real-time input, typing, text input, data validation, terminal applications",
    "author": "KonstantinDigital",
    "author_email": "martyrhartman@yandex.ru",
    "download_url": "https://files.pythonhosted.org/packages/41/1a/3a919926e4f69aa2b42ff9e0f0621107ef08060e533a71e34ef76406fc9d/inputx-1.0.3.tar.gz",
    "platform": null,
    "description": "# INPUTX\n\n`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.).\n\n## Features\n\n- **Data type validation**: Ensures input is of type `int`, `float`, or `str`.\n- **Invisible input**: Can hide user input (useful for passwords).\n- **Character restrictions**: Restrict input to specific sets of characters, such as:\n  - Only English letters (`a-z`, `A-Z`)\n  - Only Russian letters (`\u0430-\u044f`, `\u0410-\u042f`)\n  - Only digits (`0-9`)\n  - Only symbols (e.g., `!@#$%^&*`)\n\n## Supported Platforms\n\nCurrently, 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.\n\n\n## Installation\n\nTo install the package, use [GIT](https://git-scm.com/):\n\n```\ngit clone https://github.com/KonstantinDigital/Inputx.git\n```\nOr install directly from [PyPI](https://pypi.org/project/inputx/):\n\n```\npip install inputx\n\n```\n\n## USAGE\n### Basic Example\n```python\nfrom inputx import inputx\n\n# Get an integer input\nage = inputx(\"Enter your age: \", data_type=\"int\")\nprint(f\"Your age is: {age}\")\n\n# Get a float input\nprice = inputx(\"Enter the price: \", data_type=\"float\")\nprint(f\"Price: {price}\")\n\n# Get a password (invisible input)\npassword = inputx(\"Enter your password: \", invisible_input=True)\nprint(\"Password entered successfully.\")\n\n```\n\n### Restrictions\nYou can use restrictions to limit the types of characters users can enter.\n```python\nfrom inputx import inputx\n\n# Only accept English letters\nname = inputx(\"Enter your name: \", only_en_letters=True)\n\n# Only accept digits and symbols\nphone = inputx(\"Enter your phone number: \", only_digitals=True, only_symbols=True)\n\n# Only accept symbols\nsymbols = inputx(\"Enter some symbols: \", only_symbols=True)\n\n```\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://opensource.org/licenses/MIT) file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "`inputx` is a Python module that provides an advanced input function with various validation options.",
    "version": "1.0.3",
    "project_urls": null,
    "split_keywords": [
        "inputx",
        " inputs",
        " input",
        " advanced input",
        " custom input",
        " enhanced input",
        " filtered input",
        " secure input",
        " password input",
        " terminal input",
        " interactive input",
        " python input",
        " character filtering",
        " cursor navigation",
        " string validation",
        " keyboard input",
        " real-time input",
        " typing",
        " text input",
        " data validation",
        " terminal applications"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "111b6cae66bf6c4c7fdaf452920e03e03675e682262a23ac16145ec149f8b1a8",
                "md5": "55bc5d8e8eb0d8ddb80d95fc51865815",
                "sha256": "8930e3de0ec9621a36ca8c5873e9c1a7cac1cc6b29f3344a5f1e07cf4e8e4770"
            },
            "downloads": -1,
            "filename": "inputx-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55bc5d8e8eb0d8ddb80d95fc51865815",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.6",
            "size": 4837,
            "upload_time": "2024-11-30T12:28:55",
            "upload_time_iso_8601": "2024-11-30T12:28:55.979402Z",
            "url": "https://files.pythonhosted.org/packages/11/1b/6cae66bf6c4c7fdaf452920e03e03675e682262a23ac16145ec149f8b1a8/inputx-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "411a3a919926e4f69aa2b42ff9e0f0621107ef08060e533a71e34ef76406fc9d",
                "md5": "5b481f9abf44c51a1fc3aaccb4e158dc",
                "sha256": "a0338c60864f29d8245a2ed2f4e689185fa81747d5ee2e4869a1fc99b34c2894"
            },
            "downloads": -1,
            "filename": "inputx-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "5b481f9abf44c51a1fc3aaccb4e158dc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.6",
            "size": 4563,
            "upload_time": "2024-11-30T12:29:37",
            "upload_time_iso_8601": "2024-11-30T12:29:37.520671Z",
            "url": "https://files.pythonhosted.org/packages/41/1a/3a919926e4f69aa2b42ff9e0f0621107ef08060e533a71e34ef76406fc9d/inputx-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-30 12:29:37",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "inputx"
}
        
Elapsed time: 0.39427s