Overview
Flexx is a web-based UI framework for Python, allowing you to create interactive web apps using Python code. It leverages web technologies under the hood and provides a natural API for developers to work with.
Key features
- Python-only programming for web apps
- Interactive user interfaces using HTML/CSS
- Live communication between server and client
- Capability to embed Flexx widgets in other applications
- Lightweight and efficient
Common use cases
- Web applications with Python backend
- Prototyping interactive user interfaces
- Data visualization tools
- Scientific applications and dashboards
- Hybrid desktop/web applications
Installation
pip install flexx
Example
from flexx import app, ui
class Example(app.PyComponent):
def init(self):
with ui.VBox():
self.label = ui.Label(text="Hello, Flexx!")
self.button = ui.Button(text="Click me")
self.button.reaction(self.on_click)
def on_click(self, *events):
self.label.text = "Button clicked!"
if __name__ == "__main__":
app.launch(Example, 'app')
app.run()