Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Interactive Buttons Library

A Python library to create interactive buttons with keyboard navigation.


📦 Installation

pip install interactive_buttons

⚙️ Features

  • Buttons displayed as a matrix.
  • Navigation using arrow keys (↑ ↓ → ←).
  • Selection using the Enter key.
  • Customization of colors, spacing, and decorators.

🧪 Example usage of matrix_buttons

from interactive_buttons import Button, Component
from colorama import Fore, Back

# Create buttons
buttons = [
    Button(label="A1", value="Value A1"),
    Button(label="A2", value="Value A2"),
    Button(label="B1", value="Value B1"),
    Button(label="B2", value="Value B2"),
]

# Create custom component
component = Component(
    buttons=buttons,
    text_color=Fore.BLACK,
    highlight_color=Back.YELLOW,
    spaces_count=6,
    left_decorator="<",
    right_decorator=">"
)

# Launch the interactive interface
value = component.matrix_buttons()

# Display the selected value
print(f"Selected value: {value}")

🎯 Expected result

  • Buttons are displayed in a grid.
  • The user navigates with the arrow keys.
  • When a button is selected (by pressing Enter), its value is returned

Output Example :


❗ Requirements

  • Do not use an emulated terminal (such as VS Code integrated terminal or online consoles): they prevent correct keyboard input capture.

  • The library depends on:


📄 Project description

Interactive Buttons allows you to create interactive text-based menus. It’s a simple solution for:

  • command-line interfaces
  • interactive terminal tools

🔗 GitHub Repository

Check the GitHub repository for updates and contributions:

https://github.com/mbcraft-exe/interactive\_buttons

Metadata

Release files for interactive-buttons 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for interactive-buttons 4.0.0
File Size Uploaded Provenance Actions
interactive_buttons-4.0.0.tar.gz 3.2 kB Without provenance Details for interactive_buttons-4.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for interactive-buttons 4.0.0
File Interpreter ABI Platform Actions
interactive_buttons-4.0.0-py3-none-any.whl Python 3 none any Details for interactive_buttons-4.0.0-py3-none-any.whl

Total release size: 6.6 kB

Release files / interactive_buttons-4.0.0.tar.gz

Download URL interactive_buttons-4.0.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4e1c06547e80d8052e6e3149be74c81d632a345d6f3be13017abc92b91a13b20
BLAKE2b-256 checksum
How to use checksums
5b97a4a1fac69ac4858cd91123fe2189f61c8cbea9ffd21608ecd3970f79dea4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / interactive_buttons-4.0.0-py3-none-any.whl

Download URL interactive_buttons-4.0.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68ceeb18f84d5a43df3d60a7854d7b21e41f70920d4e87ef54486ff2b94d37ec
BLAKE2b-256 checksum
How to use checksums
70130c8a430e733a83bfc04984219bdbf33aa4948c764f33ca93f269aeb571b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for interactive-buttons 4.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page