Skip to main content

Control your Outputs as if they were your

Project description

PyPI - Python Version GitHub Repo stars

Installing

pip install Inputron

Using

from Inputron import Inputron

inputron = Inputron()

Inputron Library

Inputron.Message
Message(msg: str, title:str = "", space:bool = False, iserror:bool = False)

Create better outputs messages, alerts with this function. 
    
Arguments:
    <h5>msg</h5> {<code>String</code>} Set your message here.
    <h5>title</h5> {<code>String</code>} The Message Title. [Optional]
    <h5>space</h5> {<code>Bool</code>} If has space or not. [Optional] default=False
    <h5>iserror</h5> {<code>Bool</code>} If the message is to sinalize a error or not. [Optional] default=False
    <h5>alert</h5> {<code>Bool</code>} If True, add a Warn or Error after of title. [Optional] default=True
    <h5>separate</h5> {<code>String</code>} It's the separator among title and msg. [Optional] default="-"
Inputron.Loading
Loading(msg: str = "Loading", msgComplete: str = "Complete", speed: float = 0.1, repeatTimes: int = 10, icon: list = ["...", "°..", ".°.", "..°"])

Create a loader in format of terminal, manage and the Icon.
    
Arguments:
    <h5>msg</h5> {<code>String</code>} Set here your text to show while is loading.
    <h5>msgComplete</h5> {<code>String</code>} It is message that will be shown. [Optional]
    <h5>speed</h5> {<code>Float</code>} It is interval in each rotated. [Optional] default=0.1
    <h5>repeatTimes</h5> {<code>Int</code>} It is amount of time that the icon spins. [Optional] default=10
    <h5>icon</h5> {<code>List</code>} It is the icon strings, change to other if you want. [Optional] default=["...", "°..", ".°.", "..°"]
Inputron.Ask
Ask(ask:str, space:bool = True, isInt:bool = False, isFloat:bool = False, spaceleft:bool = True, beforesignal:str = ">", aftersignal:str = ":")

Use this function to ask some information of user.
    
Arguments:
    <h5>ask</h5> {<code>String</code>} It is your ask 
    <h5>space</h5> {<code>Bool</code>} If your asks will have spaces on top of below. [Optional] default=True
    <h5>isInt</h5> {<code>Bool</code>} If you want that be returned in Integer format. [Optional] default=False
    <h5>isFloat</h5> {<code>Bool</code>} If you want that be returned in Floating format. [Optional] default=False
    <h5>spaceleft</h5> {<code>Bool</code>} if you want that have a space in left side of ask. [Optional] default=True
    <h5>beforesignal</h5> {<code>String</code>} It's the signal before of ask. [Optional] default=">"
    <h5>aftersignal</h5> {<code>String</code>} It's the signal after of ask. [Optional] default=":"
Inputron.YN
YN(ask:str, title:str = 'Question', space:bool = True)

Use this function to obtain two answer, Yes or No, you can change the options.
    
Arguments:
    <h5>ask</h5> {<code>String</code>} It is your ask.
    <h5>title</h5> {<code>String</code>} It is the title of question. [Optional] default='Question'
    <h5>space</h5> {<code>Bool</code>} If your asks will have spaces on top or below. [Optional] default=True

Return:
    Boolean: True to Yes and False to No.
Inputron.QuestionOption
QuestionOption(ask:str, title:str = 'Question', space:bool = True, options=["Option 1", "Option 2", "Option 3", "Option 4"])

Use this function to obtain two answer, Yes or No, you can change the options.
    
Arguments:
    <h5>ask</h5> {<code>String</code>} It is your ask.
    <h5>title</h5> {<code>String</code>} It is the title of question. [Optional] default='Question'
    <h5>space</h5> {<code>Bool</code>} If your asks will have spaces on top or below. [Optional] default=True
    <h5>options</h5> {<code>List</code>} It's your options. [Optional] default=["Option 1", "Option 2", "Option 3", "Option 4"]

Return:
    String: It's return the option chosen.
Inputron.AVG
AVG(content:list, binsCalc:int = 4, isInt:bool = False, isFloat:bool = True, isStr:bool = False)

Use this function to calc Average of numbers to Grades.
    
Arguments:
    <h5>content</h5> {<code>List</code>} This is the list of numbers that will be used to calc.
    <h5>binsCalc</h5> {<code>Int</code>} It is the divider of calc. [Optional] default=4
    <h5>isInt</h5> {<code>Bool</code>} If the return is in integer format. [Optional] default=False
    <h5>isFloat</h5> {<code>Bool</code>} If the return is in floating format. [Optional] default=True
    <h5>isStr</h5> {<code>Bool</code>} If the return is in string format. [Optional] default=False

Contributing

1. Do a fork of Repository.

2. Create a branch to your feature 
    git checkout -b features/feature_name

3. Do commits of your changes
    git commit -am 'feature name'

4. Send to the branch
    git push origin features/feature_name

5. Open a Pull Request 

License

This project is licensed under the MIT License.

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

inputron-1.2.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Inputron-1.2.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file inputron-1.2.2.tar.gz.

File metadata

  • Download URL: inputron-1.2.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for inputron-1.2.2.tar.gz
Algorithm Hash digest
SHA256 1f9c3898798db923e3fe313ac40a88384f9c6544c44ee12419f8c73ad1052efa
MD5 5cbc08e2367679f01bc190794b0d3076
BLAKE2b-256 ca1f9e6267eb14cfa66d65502eda0986c933aa91afd566b4f0e87a00ff3363f7

See more details on using hashes here.

File details

Details for the file Inputron-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: Inputron-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for Inputron-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9c5eb785cafce5cb5981122e0ee66f9bae81ffd8272ceaba3d30dc351508113e
MD5 2f562093ee70c164b3a5594012fea531
BLAKE2b-256 25aa277c370c750ccef80c3d1504001bf0514a108492f766fe766edeb50c2509

See more details on using hashes here.

Supported by

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