https://github.com/g4brielxavier/inputron-lib
Inputron is a Python Library for better managing outputs and inputs to terminal.
https://github.com/g4brielxavier/inputron-lib
library library-python pip python terminal
Last synced: about 1 month ago
JSON representation
Inputron is a Python Library for better managing outputs and inputs to terminal.
- Host: GitHub
- URL: https://github.com/g4brielxavier/inputron-lib
- Owner: G4brielXavier
- License: mit
- Created: 2024-10-16T04:06:55.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-10-18T17:09:15.000Z (7 months ago)
- Last Synced: 2025-03-20T09:41:14.620Z (about 2 months ago)
- Topics: library, library-python, pip, python, terminal
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

### Installing
```bash
pip install Inputron
```
### Using
```python
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:
msg
{String
} Set your message here.
title
{String
} The Message Title. [Optional]
space
{Bool
} If has space or not. [Optional] default=False
iserror
{Bool
} If the message is to sinalize a error or not. [Optional] default=False
alert
{Bool
} If True, add a Warn or Error after of title. [Optional] default=True
separate
{String
} 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:
msg
{String
} Set here your text to show while is loading.
msgComplete
{String
} It is message that will be shown. [Optional]
speed
{Float
} It is interval in each rotated. [Optional] default=0.1
repeatTimes
{Int
} It is amount of time that the icon spins. [Optional] default=10
icon
{List
} 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:
ask
{String
} It is your ask
space
{Bool
} If your asks will have spaces on top of below. [Optional] default=True
isInt
{Bool
} If you want that be returned in Integer format. [Optional] default=False
isFloat
{Bool
} If you want that be returned in Floating format. [Optional] default=False
spaceleft
{Bool
} if you want that have a space in left side of ask. [Optional] default=True
beforesignal
{String
} It's the signal before of ask. [Optional] default=">"
aftersignal
{String
} 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:
ask
{String
} It is your ask.
title
{String
} It is the title of question. [Optional] default='Question'
space
{Bool
} If your asks will have spaces on top or below. [Optional] default=TrueReturn:
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:
ask
{String
} It is your ask.
title
{String
} It is the title of question. [Optional] default='Question'
space
{Bool
} If your asks will have spaces on top or below. [Optional] default=True
options
{List
} 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:
content
{List
} This is the list of numbers that will be used to calc.
binsCalc
{Int
} It is the divider of calc. [Optional] default=4
isInt
{Bool
} If the return is in integer format. [Optional] default=False
isFloat
{Bool
} If the return is in floating format. [Optional] default=True
isStr
{Bool
} 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.