Skip to main content

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
  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PySimpleInput-0.0.5.post1.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

PySimpleInput-0.0.5.post1-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page