This is the simplest module for improved work with input.
Project description
Easy Input Library (EasyInput)
The library is distributed under the MIT license and can be downloaded and used by anyone.
How to install
To install, you can download library from the repository from GitHub
Using
Input
The arguments of main functions are:
input():
__prompt: str, __default: str, __colorful: bool, __color: Color or BgColor
- __prompt:
A String, representing a default message before the input.
- __default:
A String, representing a default message in the input
- __colorful:
A Bool Variable, representing whether the input will be colored
- __color:
A Color or BgColor Varible, representing Red, Green and Blue colors in the input
Colors
The main classes are:
Color
Color: A Class width many Str Variables, width ANSI codes of colors
BgColor
BgColor: A Class width many Str Variables, width ANSI codes of background colors
The arguments of main function are:
coloring():
__key: dict, __string: str
- __key:
A Dict Variable, in which the key is the word that needs to be colored, and the value is the color. Key of dict, have built-in words like this: __start__, __end__, __mid__, __all__. You can see their in examples
- __string
A Str Variable, which is the text to be colored
Some examples
Input
import EasyInput
EasyInput.input('What's your name? ', 'My name is Funsy')
Color
from EasyInput import colors
print(colors.coloring({'from': colors.Color.BLUE}, 'Hello from EasyInput!'))
print(colors.coloring({'__start__': colors.BgColor.RED}, 'Hello from EasyInput'))
Input & Color
import EasyInput
EasyInput.input('What’s your name? ', 'Funsy', True, EasyInput.colors.Color.BLUE)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flowinput-0.1.5.tar.gz
.
File metadata
- Download URL: flowinput-0.1.5.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654533f7bdca7d96c88690f6f492ef8b34eefe264b1025584adba06e2ac7f8c8 |
|
MD5 | c2721e7d7b03af7931fc05b016d5faf9 |
|
BLAKE2b-256 | b61f7130cc1fbd0c3ca8a07c89789bfc7a9b7089efffc1189312d7a5e6dfcdb8 |
File details
Details for the file FlowInput-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: FlowInput-0.1.5-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14ded139a2cde6dcf4a4075bd10b4e9da5c8258fdb1c0601914f8cd391811fcc |
|
MD5 | a1945df34413ece485bee0748b951656 |
|
BLAKE2b-256 | 9bab46ee93320da95631bf9ec831a0011fb09a322357c8283c794a298ccbdf8d |