Skip to main content

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

  1. From pip:
pip install rocketui  # coming soon, currently use github
  1. 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)

  1. Clone the repo and cd into it.
  2. Run the command: chmod +x generate-docs.sh && ./generate-docs.sh
  3. Run the command: python3 -m http.server 8000 -d docs
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rocketui-0.1.0.tar.gz (40.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rocketui-0.1.0-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

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

Hashes for rocketui-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8a8d81ba1782cde9a1a275e3cfc64d7eea540b65475616800977a5f3242be715
MD5 08f8a9ba161923309c2a7fbc16c82f64
BLAKE2b-256 64907e9b1bd89951247125c140ea70548c411a64d3848995d7074c7930da2cf6

See more details on using hashes here.

Provenance

The following attestation bundles were made for rocketui-0.1.0.tar.gz:

Publisher: python-publish.yml on neoapps-dev/RocketUI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for rocketui-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe959cab3f97538e3e86686411d4278c9ca1bde4ca754d1666b2efe255e9fd6e
MD5 d506464cb1723cccbb51bf4f6c7d45d4
BLAKE2b-256 71e3111b06ca0332094ebdce5a0bb11da0f272b685ba2cccae2becf59f8f8ec5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rocketui-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on neoapps-dev/RocketUI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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