# PySimpleInput | v0.0.6
<p align="center">
<img src="https://i.ibb.co/DzJgLRW/image.png" width="250" height="230">
</p>
Hi! Let me introduce *PySimpleInput*
This library is still on development progress.
if you've found a bugs, report it to me at [PySimpleInput Github Issues](https://github.com/turtleion/PySimpleInput/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 then 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 update then choose main branch*
## How to Initialize PySimpleInput module
```
import PySimpleInput
pysim = PySimpleInput.PySimpleInput()
```
### Method
- input()
- label: Give a question to the user
- options: set additional settings to the input
- process_()
> process_ might like input but its only used for processing text
- text: Text to proceed
- options: set additional settings to the process_
#### ARGUMENTS
- input
- 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`
- process_
- TEXT (REQUIRED)
- OPTIONS (OPTIONAL)
### OPTIONS
> Note: argument "options" in method input() and process_() are same
this section contain all options that available in PySimpleInput
- rmwhtspc_* :
this option will remove all white space in user input string
- rmwhtspc_arr
> Note: If you're using this option, you might cannot use some of the options
It'll return array/list instead of str
> ex. `o = pysimpleinput.input("What's your name?", ["rmwhtspc_arr"])
> Result. `"Joseph Arauro" > "["Joseph", "Arauro"]"`
- rmwhtspc_str
It'll 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"`
- passwd_input
> Note: If you use this option, please make sure you have access to `/dev/tty.` (Unix User)
This option will make the input hidden
`(NO EXAMPLE)`
- 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"`
- min_`[NUMBER]` and max_`[NUMBER]`
Now, you can set min/max length for the input
> ex. `res = pysimpleinput.input("What's your name?", options["min_8", "max_20"])`
>> User Inputted: Fred
>> The prompt will ask you again if you didn't pass the requirements
- It'll show Warnings
- Too much answer.
- Not enough answer.
- translate and tr_`[COUNTRY ISOCODE]`
> Note: Please use "translate" option at the end of "options" list argument
This option will translate the input to another language
You must add "tr_[COUNTRY ISOCODE]" after the translate option
> Supported Language [COUNTRY ISOCODE](https://pypi.org/project/translators/#supported-languages)
like this:
- `tr_en` > translate_english
- `tr_de` > translate_deutsch or translate_germany
- `tr_fr` > translate_french
Example: (Translating from Indonesia to English)
> ex. `tr = pysimpleinput.input("Apa makanan favorit mu?", options["translate", "tr_en"])`
>> User inputted: "Aku suka Nasi Goreng"
> Result. --> `I like fried rice.`
- (DEPRECATED) 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)`
- (DEPRECATED) 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, val_phonenumber" options!
### and also if you are using "rmwhtspc_arr" option.. you might cannot use "valemail, valphnum, filteralph, filternum" options!
--------------
# Contribution
I'm 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
- Renamed features
- Removed some files
--> Changelog | 0.0.5-REV2
- Update README.md
--> Changelog | 0.0.6
- Update README.md
- Add new method:
- process_()
- Add new options:
- translate and tr_`[COUNTRY ISOCODE]`
- min_`[NUM]` and max_`[NUM]`
- passwd_input
# 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 btw :).*
Raw data
{
"_id": null,
"home_page": "https://github.com/turtleion/PySimpleInput",
"name": "PySimpleInput",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "Python3 Input",
"author": "Turtleion",
"author_email": "Turtleion <remastred89@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/f6/45/a72ff5b2b08edd185635a1e035626fc595b041bcb0be7ffd396344508ce7/PySimpleInput-0.0.6.5.tar.gz",
"platform": null,
"description": "# PySimpleInput | v0.0.6\n<p align=\"center\">\n <img src=\"https://i.ibb.co/DzJgLRW/image.png\" width=\"250\" height=\"230\">\n</p>\nHi! Let me introduce *PySimpleInput*\n\nThis library is still on development progress.\n if you've found a bugs, report it to me at [PySimpleInput Github Issues](https://github.com/turtleion/PySimpleInput/issues) \n \n# Installation\nYou can install PySimpleInput with pip or using .whl\n### Using PIP\n`pip3 install --upgrade PySimpleInput`\n### Using wheel\n- First, you need to get the wheel file from PyPi or Github\n- And then you can install it\n`pip3 install (PySimpleInput Wheel File).whl`\n\n# Docs\n*if you want the latest update, choose the devel branch, if you want stable update then choose main branch*\n\n## How to Initialize PySimpleInput module\n```\nimport PySimpleInput\n\npysim = PySimpleInput.PySimpleInput()\n```\n\n\n### Method \n- input() \n - label: Give a question to the user\n - options: set additional settings to the input\n\n- process_()\n > process_ might like input but its only used for processing text\n - text: Text to proceed\n - options: set additional settings to the process_\n#### ARGUMENTS\n - input\n - LABEL (REQUIRED) : This argument will ask questions to the user\n - OPTIONS (OPTIONAL) : this argument provides additional settings to the input \n `ex. filtering user input to return only numbers`\n - process_\n - TEXT (REQUIRED)\n - OPTIONS (OPTIONAL)\n\n### OPTIONS\n> Note: argument \"options\" in method input() and process_() are same\nthis section contain all options that available in PySimpleInput\n\n- rmwhtspc_* :\n \n this option will remove all white space in user input string\n - rmwhtspc_arr\n > Note: If you're using this option, you might cannot use some of the options\n \n It'll return array/list instead of str\n > ex. `o = pysimpleinput.input(\"What's your name?\", [\"rmwhtspc_arr\"])\n\n > Result. `\"Joseph Arauro\" > \"[\"Joseph\", \"Arauro\"]\"`\n\n - rmwhtspc_str \n \n It'll return str\n > ex. `o = pysimpleinput.input(\"What is your name?\", [\"rmwhtspc_str\"])`\n\n > Result. `\"Joseph Arauro\" -> \"JosephArauro\"`\n\n\n- filter_num \n \n this option will filter user input to return only numbers\n\n > ex. `pysimOut = pysimpleinput.input(\"How old are you?\", [\"filternum\"])`\n\n > Result. --> `\"oejnzo299kwjo02\" -> \"29902\"`\n\n- filteralph \n \n This option will filter user input to return alphabet characters only\n\n > ex. `pysimOut = pysimpleinput.input(\"Type random string!\", [\"filteralph\"])`\n\n > Result. --> `\"hello219282839my282872name283739191is8287399turtleion\" -> \"hellomynameisturtleion\"`\n\n- passwd_input\n > Note: If you use this option, please make sure you have access to `/dev/tty.` (Unix User)\n\n This option will make the input hidden\n\n `(NO EXAMPLE)`\n\n- upcase and lowcase\n\n This option will change the user input letters to uppercase or vice versa\n\n > ex. `pysimOut = pysimpleinput.input(\"What is your name?\", options=[\"upcase/lowcase\"])`\n\n > Result. --> `\"gerardo martinuez firatzi\" <(OR)> \"GERARDO MARTINUEZ FIRATZI\"`\n\n- min_`[NUMBER]` and max_`[NUMBER]`\n\n Now, you can set min/max length for the input\n \n > ex. `res = pysimpleinput.input(\"What's your name?\", options[\"min_8\", \"max_20\"])`\n\n >> User Inputted: Fred\n\n >> The prompt will ask you again if you didn't pass the requirements\n - It'll show Warnings\n - Too much answer.\n - Not enough answer.\n- translate and tr_`[COUNTRY ISOCODE]`\n\n > Note: Please use \"translate\" option at the end of \"options\" list argument\n \n This option will translate the input to another language\n You must add \"tr_[COUNTRY ISOCODE]\" after the translate option\n > Supported Language [COUNTRY ISOCODE](https://pypi.org/project/translators/#supported-languages)\n \n like this:\n - `tr_en` > translate_english\n - `tr_de` > translate_deutsch or translate_germany\n - `tr_fr` > translate_french\n Example: (Translating from Indonesia to English)\n > ex. `tr = pysimpleinput.input(\"Apa makanan favorit mu?\", options[\"translate\", \"tr_en\"])`\n \n >> User inputted: \"Aku suka Nasi Goreng\"\n\n > Result. --> `I like fried rice.`\n- (DEPRECATED) valemail\n\n This option will validate an email from the user\n\n > ex. `pysimOut = pysimpleinput.input(\"Type an email!\",[\"valemail\"])\n\n > Result. --> `True | False (If the string is an email it will return True otherwise False)`\n\n- (DEPRECATED) validate_phonenumber\n\n This option will validate an phone number from the user\n\n > ex. `pysimOut = pysimpleinput.input(\"Type your phone numbers!\", [\"valphnum])\n\n > Result. --> `PhoneNumber | Warning (If the string is a valid number it will return the number back otherwise a warning`\n\n\n### And Also, You can combine options like this\n`pysim = pysimpleinput.input(\"What is your name?\", [\"rmwhtspc_str\",\"filteralph\")`\n\n### Do not combine \"valemail, val_phonenumber\" options!\n### and also if you are using \"rmwhtspc_arr\" option.. you might cannot use \"valemail, valphnum, filteralph, filternum\" options!\n--------------\n\n# Contribution\nI'm Appreciate you for contributing on this modules\n### How To Contribute\nYou can Contribute by forking this repo and start adding more features, optimizing code and fixing bugs\nThen you can make a pull request to this repo and wait your pull request merged\n\nYou can also contribute by giving a star to this repo \ud83d\udc4d\n-----------\n\n\n# Changelog\n--> Changelog | 0.0.3\n- Add Flags 7, 8\n- Add Docs to README.md\n- Remove wiki.py and PySimpleInput.wiki function (Moved to README.md)\n- Fix README.md | version not changed\n--------\n\n--> Changelog | 0.0.3.1\n- Fix README.md Indentation blocks\n- Fixing Typo in README.md\n--------\n\n--> Changelog | 0.0.3.5\n- Fix README.md\n- Make the options simpler and easier to understand (You still can use old way)\n- Separate Modern & Old ways\n--------\n\n--> Changelog | 0.0.4\n- Changed the contents of README.md to make it easier to understand\n- Added More Features:\n - \"validate_email\",\n - \"validate_phonenumber\"\n - \"validate_url\"\n- Recombining modern & old PySimpleInput\n- Create Makefile to simplify the development process\n--------\n\n--> Changelog | 0.0.5\n- Changed the contents of README.md\n- Less features to make it lightweighter and simplier\n - Removed features\n - Filter URL\n - Redirect output to a file\n - Prevent User KEY_ENTER press\n- Renamed features\n- Removed some files\n\n--> Changelog | 0.0.5-REV2\n- Update README.md\n\n--> Changelog | 0.0.6\n- Update README.md\n- Add new method:\n - process_()\n- Add new options:\n - translate and tr_`[COUNTRY ISOCODE]`\n - min_`[NUM]` and max_`[NUM]`\n - passwd_input\n\n\n# About\nThis project was made 100% by Me (Turtleion) \nThis project was licensed by MIT License\nVisit my GitHub\nhttps://github.com/turtleion\n\n\n*Sorry for bad English, I'am Indonesian btw :).*\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Advanced Input System",
"version": "0.0.6.5",
"project_urls": {
"Bug Tracker": "https://github.com/turtleion/PySimpleInput/issues",
"Homepage": "https://github.com/turtleion/PySimpleInput"
},
"split_keywords": [
"python3",
"input"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d1fc13c76388be3b3c53c916ab167b666cd132dbdebf100c22260bfe93f24acf",
"md5": "53608d0ddb769baecb86e40478ba7958",
"sha256": "6e9c24288aa63547558ab362e9ddef9f2e723fccfcdfdfc399378f739656c802"
},
"downloads": -1,
"filename": "PySimpleInput-0.0.6.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "53608d0ddb769baecb86e40478ba7958",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10028,
"upload_time": "2023-08-20T13:34:58",
"upload_time_iso_8601": "2023-08-20T13:34:58.965519Z",
"url": "https://files.pythonhosted.org/packages/d1/fc/13c76388be3b3c53c916ab167b666cd132dbdebf100c22260bfe93f24acf/PySimpleInput-0.0.6.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f645a72ff5b2b08edd185635a1e035626fc595b041bcb0be7ffd396344508ce7",
"md5": "9905fc4229bdb6c227714b481b2887fa",
"sha256": "a8bebd44d7df8e64fda672feae315325e35879b47c597ca6365eb793c33f84c4"
},
"downloads": -1,
"filename": "PySimpleInput-0.0.6.5.tar.gz",
"has_sig": false,
"md5_digest": "9905fc4229bdb6c227714b481b2887fa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 9742,
"upload_time": "2023-08-20T13:35:02",
"upload_time_iso_8601": "2023-08-20T13:35:02.869657Z",
"url": "https://files.pythonhosted.org/packages/f6/45/a72ff5b2b08edd185635a1e035626fc595b041bcb0be7ffd396344508ce7/PySimpleInput-0.0.6.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-20 13:35:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "turtleion",
"github_project": "PySimpleInput",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "pysimpleinput"
}