No project description provided
Project description
Interactive Buttons Library
A Python library for creating interactive buttons with keyboard navigation.
Installation
You can install the Interactive Buttons library via pip:
pip install interactive_buttons
Usage
Here's an example of how to use the library to create interactive buttons:
from interactive_buttons import linear_buttons
# Change button color :
# Way 1 :
linear_buttons.Variables.HIGHLIGHT = "\033[30;43m" # Yellow background
# Way 2 :
from colorama import Fore, Back # Needs to be installed by running the command `pip install colorama`
linear_buttons.Variables.HIGHLIGHT = Back.RED + Fore.BLACK # Red background and Black text
# Change decorator (in [button text] the square brackets are the decorators) :
# Way 1 :
linear_buttons.Variables.DECORATOR = ["<", ">"] # [button text] -> <button text>
# Way 2 :
linear_buttons.Variables.DECORATOR = [] # [button text] -> button text
# Way 3 :
linear_buttons.Variables.DECORATOR = ["> "] # [button text] -> > button text
# Define button configurations as a list
button_configurations = [
['Button 1', function_1],
['Button 2', function_2, ('arg1', 'arg2')],
]
# Create linear buttons and start the interactive interface
linear_buttons(button_configurations)
Project Description
The Interactive Buttons library allows you to easily create interactive buttons for user interaction in your Python applications. It provides a simple and intuitive way to create a list of buttons, associate them with functions, and navigate through them using the keyboard. This library is particularly useful for creating text-based interactive menus and interfaces.
GitHub Repository
Check out the GitHub repository for the latest updates, issues, and contributions. Feel free to contribute to the project or report any issues you encounter.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for interactive_buttons-2.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d330cd6943855ce0add86d1694fe9f094b4a8d3042ca113bb96b842ff20076f |
|
MD5 | 5e02ab658121518db5f3a625d4bc4fd0 |
|
BLAKE2b-256 | b8b14c1868014d8c68b82b46c6922606843406db4d3862a88fdbfc423f76960c |
Hashes for interactive_buttons-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 975bf06dece6e7aec694fa8d48427914cff003944629ae6136522337181c4b78 |
|
MD5 | 1cb5ee23890f64c6af6c753443962397 |
|
BLAKE2b-256 | 05e4ca951f2c8a8448dbc7321c44778a36db7b5a35412089ab36c6b730af25e9 |