Skip to main content

Extends the Rich library with interactive layouts and tables, allowing seamless navigation and interaction via keyboard shortcuts

Project description

Rich Interactive

Extends the Rich library with interactive layouts and tables, allowing seamless navigation and interaction via keyboard shortcuts

Interactive Layouts

You can create interactive layouts that can be easily navigated, and you can switch the selection to any of the children.

console = Console(width=60, height=15)

layout = InteractiveLayout()
layout.split(
    InteractiveLayout(name="header", size=5),
    InteractiveLayout(name="main", size=5),
    InteractiveLayout(name="footer", size=5),
)
layout.traverse()
for child in layout.children:
    child.update(Panel(Text(child.name, style="yellow")))

print("Initial layout:")
print(layout)

layout.switch_selection()

print("After switching selection:")
print(layout)

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

rich_interactive-0.5.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

rich_interactive-0.5.1-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

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