Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Easily create terminal user interface containing menus, text boxes and input fields for your projects
Copyright (c) 2022 Paulin-Dev.
Contact (Discord) : Pekkos#9809
MyTUI simplies for both users and developers terminal experience. It is inspired by the interface of the Rasberry Pi Software Configuration Tool (raspi-config). It is fully responsive to work with any terminals' size. It provides quick-to-implement functions to create interfaces such as :
If you have issues or ideas for this package, please contact the author.
getkey Package to get user's input
You can use the config
method to configure some options.
from mytui import MyTUI
MyTUI.config(
text_center=True,
can_quit=True,
quit_key='q'
)
You can always change this later
The quit key will exit the program. The "back" string will be returned if the user presses escape.
This is the most basic interface, it creates a simple text box with its title and text. Press Enter
to exit.
It returns None
.
from mytui import MyTUI
MyTUI.textbox(title="Your Title", text="Your text")
you can use \n
in the text fields
Output :
You can use menus to create a list of options. Use the up and down arrows to navigate.
It returns the name (str) of the selected option.
from mytui import MyTUI
options = [
'1. First option',
'2. Second option',
'3. Third option'
]
selected = MyTUI.menu(title="Your Title", text="Your text", options=options)
if selected == options[0]:
# do stuff
Output :
The yes/no interface is basically used to ask yes/no questions to the targeted user. Use the left and right arrows or tab to navigate.
It returns True
(bool) if the selected answer is "yes" else False
.
from mytui import MyTUI
if MyTUI.yesno(title="Your Title", text="Your question"):
# do stuff
else:
# do other stuff
Output :
Last interface but not least : input fields. You can create input fields to recover a value from your user. All parameters are optional. Press Enter
to submit your answer.
It returns the value (str) inside the input field.
from mytui import MyTUI
output = MyTUI.input(
title="Your Title",
text="Your text",
default_text="",
input_size=60,
max_length=50,
min_length=0,
can_delete_default_text=False,
allow_spaces=True,
only_numeric=False,
only_alpha=False
)
Output :
MIT License
Copyright (c) 2022 Paulin-Dev
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Easily create terminal user interface containing menus, text boxes and input fields for your projects
We found that MyTUI demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.