Advanced Input System
Project description
PySimpleInput | v0.0.5 Rev. 1
Hi! Let me introduce PySimpleInput
This library still on development progress. if you found a bugs, report it to me at PySimpleInput Github Issues
Installation
You can install PySimpleInput with pip or using .whl
Using PIP
pip3 install --upgrade PySimpleInput
Using wheel
- First, you need to get the wheel file from PyPi or Github
- And, you can install it
pip3 install (PySimpleInput Wheel File).whl
Docs
if you want the latest update, choose the devel branch, if you want stable then choose main branch
How to Initialize PySimpleInput modules
import PySimpleInput
pysim = PySimpleInput.PySimpleInput()
Method
- input()
- label: Give a question to the user
- options: set additional settings to the input
ARGUMENTS on the input method
LABEL (REQUIRED) : This argument will ask questions to the user
OPTIONS (OPTIONAL) : this argument provides additional settings to the input
ex. filtering user input to return only numbers
OPTIONS on the input method
this section contains all options available in PySimpleInput (Modern)
-
rmwhtspc_* : this option will remove all white space in user input string
-
rmwhtspc_arr : Will return array/list instead of str
ex. `o = pysimpleinput.input("What's your name?", ["rmwhtspc_arr"])
Result.
"Joseph Arauro" > "["Joseph", "Arauro"]"
-
rmwhtspc_str : Will return str
ex.
o = pysimpleinput.input("What is your name?", ["rmwhtspc_str"])
Result.
"Joseph Arauro" -> "JosephArauro"
-
-
filter_num : this option will filter user input to return only numbers
ex.
pysimOut = pysimpleinput.input("How old are you?", ["filternum"])
Result. -->
"oejnzo299kwjo02" -> "29902"
-
filteralph : This option will filter user input to return alphabet characters only
ex.
pysimOut = pysimpleinput.input("Type random string!", ["filteralph"])
Result. -->
"hello219282839my282872name283739191is8287399turtleion" -> "hellomynameisturtleion"
-
upcase and lowcase : This option will change the user input letters to uppercase or vice versa
ex.
pysimOut = pysimpleinput.input("What is your name?", options=["upcase/lowcase"])
Result. -->
"gerardo martinuez firatzi" <(OR)> "GERARDO MARTINUEZ FIRATZI"
-
valemail : This option will validate an email from the user
ex. `pysimOut = pysimpleinput.input("Type an email!",["valemail"])
Result. -->
True | False (If the string is an email it will return True otherwise False)
-
validate_phonenumber : This option will validate an phone number from the user
ex. `pysimOut = pysimpleinput.input("Type your phone numbers!", ["valphnum])
Result. -->
PhoneNumber | Warning (If the string is a valid number it will return the number back otherwise a warning
And Also, You can combine options like this
pysim = pysimpleinput.input("What is your name?", ["rmwhtspc_str","filteralph")
Do not combine "valemail, valphnum" options! and also if you use "rmwhtspc_arr" options.. you will cannot use "valemail, valphnum, filteralph, filternum" options!
Contribution
I Appreciate you for contributing on this modules
How To Contribute
You can Contribute by forking this repo and start adding more features, optimizing code and fixing bugs Then you can make a pull request to this repo and wait your pull request merged
You can also contribute by giving a star to this repo 👍
Changelog
--> Changelog | 0.0.3
- Add Flags 7, 8
- Add Docs to README.md
- Remove wiki.py and PySimpleInput.wiki function (Moved to README.md)
- Fix README.md | version not changed
--> Changelog | 0.0.3.1
- Fix README.md Indentation blocks
- Fixing Typo in README.md
--> Changelog | 0.0.3.5
- Fix README.md
- Make the options simpler and easier to understand (You still can use old way)
- Separate Modern & Old ways
--> Changelog | 0.0.4
- Changed the contents of README.md to make it easier to understand
- Added More Features:
- "validate_email",
- "validate_phonenumber"
- "validate_url"
- Recombining modern & old PySimpleInput
- Create Makefile to simplify the development process
--> Changelog | 0.0.5
- Changed the contents of README.md
- Less features to make it lightweighter and simplier
- Removed features
- Filter URL
- Redirect output to a file
- Prevent User KEY_ENTER press
- Removed features
- Renamed features
- Removed some files
About
This project was made 100% by Me (Turtleion) This project was licensed by MIT License Visit my GitHub https://github.com/turtleion
Sorry for bad English, I"am Indonesian.
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
Hashes for PySimpleInput-0.0.5.post1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cff39c71170b92489e5c1a4d7ffea6e9ff02646b80d40087eb621f9fe3b9338f |
|
MD5 | 5a0999038987110ed5edd84f965e6ca9 |
|
BLAKE2b-256 | 435259adc73e5714389596120943f3378b5da3703e9fc163fa0da12861819d29 |
Hashes for PySimpleInput-0.0.5.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33092fe53cb152b2025ef0423c62837650c708054982df656a28e8502fa10ef9 |
|
MD5 | 7142e4ea4e5fb0ad06e152486ab633c5 |
|
BLAKE2b-256 | d1f8cf360679f8eb8454d450471ea559623e44285d295a4ab43062ff4b86fd7a |