A fast Qt6-based reactive UI framework for Python
Project description
🚀 RocketUI
RocketUI is a minimalistic, declarative UI framework designed for building reactive Python apps with a clean and intuitive API. based on Qt6
✨ Features
- 📦 Component(Rocketable)-based architecture
- 🔄 Reactive state management
- 🧱 Built-in widgets (Text, Button, TextInput, etc.)
- 🧪 Custom components via
Rocketables - 💡 Simple and readable syntax
- 🔥 Support for PySide6 Qt widgets
📦 Installation
- From
pip:
pip install rocketui # coming soon, currently use github
- From GitHub:
git clone https://github.com/neoapps-dev/rocketui.git
# do the command in your project root/src directory and use it
🚀 Quick Start
Here's a simple example to get you started:
from rocketui.core import App
from rocketui.widgets.column import Column
from rocketui.widgets.text import Text
from rocketui.widgets.button import Button
from rocketui.widgets.textinput import TextInput
from rocketui.enums import TextSize
from rocketui.state import State
class MyApp:
def rocketize(self):
self.result = State("")
self.label = Text(lambda: f"{self.result.value}", size=TextSize.Big)
self.input = TextInput("Eval...")
self.result.bind(self.label.update)
return Column(
content=lambda: [
self.label,
self.input,
Button("Eval", on_click=self.evalcode)
]
)
def evalcode(self):
try:
self.result.set(eval(self.input.get_value()))
except Exception as e:
self.result.set(e)
app = App(MyApp)
app.rocketize()
🧪 Rocketables
RocketUI includes support for custom components ("Rocketables"), here's an example one attached with RocketUI:
from rocketui.rocketables.test import Test
class MyApp:
def rocketize(self):
return Column(content=lambda: [
Test().rocketize() # rocketize the rocketable Test
]
)
And here is the Test Rocketable code:
from rocketui.state import State
from rocketui.widgets.text import Text
from rocketui.widgets.button import Button
from rocketui.widgets.column import Column
from rocketui.enums import TextSize
from rocketui.rocketable import Rocketable
class Test(Rocketable):
def rocketize(self):
self.counter = State(0)
self.label = Text(lambda: f"Counter: {self.counter.value}", size=TextSize.Medium)
self.counter.bind(self.label.update)
return Column(lambda: [
self.label,
Button("Increase", on_click=self.increment)
])
def increment(self):
self.counter.set(self.counter.value + 1)
📚 Documentation
(WIP. undocumented but still shows API. gonna be hosted in the future)
- Clone the repo and
cdinto it. - Run the command:
chmod +x generate-docs.sh && ./generate-docs.sh - Run the command:
python3 -m http.server 8000 -d docs - Visit the documentation at
http://localhost:8000
🤝 Contributing
We welcome contributions! Feel free to fork the repo and submit a pull request.
📜 License
GPLv3
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rocketui-0.1.0.tar.gz.
File metadata
- Download URL: rocketui-0.1.0.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a8d81ba1782cde9a1a275e3cfc64d7eea540b65475616800977a5f3242be715
|
|
| MD5 |
08f8a9ba161923309c2a7fbc16c82f64
|
|
| BLAKE2b-256 |
64907e9b1bd89951247125c140ea70548c411a64d3848995d7074c7930da2cf6
|
Provenance
The following attestation bundles were made for rocketui-0.1.0.tar.gz:
Publisher:
python-publish.yml on neoapps-dev/RocketUI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rocketui-0.1.0.tar.gz -
Subject digest:
8a8d81ba1782cde9a1a275e3cfc64d7eea540b65475616800977a5f3242be715 - Sigstore transparency entry: 225786807
- Sigstore integration time:
-
Permalink:
neoapps-dev/RocketUI@73e290b78af03471180f02ef3b509a983e864a87 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/neoapps-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@73e290b78af03471180f02ef3b509a983e864a87 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rocketui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rocketui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe959cab3f97538e3e86686411d4278c9ca1bde4ca754d1666b2efe255e9fd6e
|
|
| MD5 |
d506464cb1723cccbb51bf4f6c7d45d4
|
|
| BLAKE2b-256 |
71e3111b06ca0332094ebdce5a0bb11da0f272b685ba2cccae2becf59f8f8ec5
|
Provenance
The following attestation bundles were made for rocketui-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on neoapps-dev/RocketUI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rocketui-0.1.0-py3-none-any.whl -
Subject digest:
fe959cab3f97538e3e86686411d4278c9ca1bde4ca754d1666b2efe255e9fd6e - Sigstore transparency entry: 225786809
- Sigstore integration time:
-
Permalink:
neoapps-dev/RocketUI@73e290b78af03471180f02ef3b509a983e864a87 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/neoapps-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@73e290b78af03471180f02ef3b509a983e864a87 -
Trigger Event:
release
-
Statement type: