Skip to main content

Build modern Websites and Apps just with Python

Project description

Rio Logo

Rio is an easy to use framework for creating websites and apps and is based entirely on Python. 🐍
You won't need a single line of HTML, CSS, or JavaScript to create beautiful, modern apps.

Tutorial - Examples - Discord - Docs - Source Code

Rio brings React-style components to Python. Pull from a wealth of built-in components and combine them to create your own custom components. Then combine those into entire apps. Best of all, Rio apps can run both locally on your machine and on the web.

Rio Version Discord Python Version License GitHub Stars

Features 🧩

  • Modern, declarative UI framework
  • 100% Python - Zero HTML, CSS, or JavaScript required
  • Over 50 Built-in components for common UI elements, such as rio.Switch, rio.Button, and rio.Text, and many more
  • Integrates with modern Python tooling: Thanks to being entirely Type Safe editors can give you instant suggestions and highlight problems right away
  • Apps can run both locally and on the web
  • Open Source & Free forever

Example ⌨️

# Define a component that counts button clicks
class ButtonClicker(rio.Component):
    # Define the attributes of the component. Changing these will
    # affect the GUI.
    clicks: int = 0

    # Define a method that increments the click count. We'll later
    # make a button that calls this method whenever it is pressed.
    def _on_press(self) -> None:
        self.clicks += 1

    # Define the `build` method. This method essentially tells rio
    # what a ButtonClicker component looks like. Whenever the state
    # of the ButtonClicker component changes, rio will call its
    # `build` method and update the GUI according to the output.
    def build(self) -> rio.Component:
        return rio.Column(
            rio.Button('Click me', on_press=self._on_press),
            rio.Text(f'You clicked the button {self.clicks} time(s)'),
        )

# Create an App and tell it to display a ButtonClicker when it starts
app = rio.App(build=ButtonClicker)
app.run_in_browser()

Installation 🛠️

Rio is available on PyPI, so you can install it using pip:

pip install rio-ui

Getting Started 🎓

Rio comes with a very helpful command line utility to help you out. Create a new project in one short command:

rio new

You can choose from a variety of built-in templates to get you started. Here's a complete example to create a project based on the tic-tac-toe template:

rio new my-project --type website --template "Tic-Tac-Toe"
cd my-project
rio run

You'll have your first app up and running in seconds!

Status: In Development 🚧

Rio is still in development. We're working hard to bring you the best possible experience. If you have any feedback, please let us know on our Discord server.

Contributing 🤝

TODO: Write how someone can contribute to the project. :)

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

rio_ui-0.5.16.tar.gz (23.3 MB view details)

Uploaded Source

Built Distribution

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

rio_ui-0.5.16-py3-none-any.whl (3.5 MB view details)

Uploaded Python 3

File details

Details for the file rio_ui-0.5.16.tar.gz.

File metadata

  • Download URL: rio_ui-0.5.16.tar.gz
  • Upload date:
  • Size: 23.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for rio_ui-0.5.16.tar.gz
Algorithm Hash digest
SHA256 fc355227505c3afe119eef82175602c0b19679fc1c6918f87979da6faed5d090
MD5 533e2c2f9d1f6e03f0553ad16d3536a0
BLAKE2b-256 203c9eccf3a19f7a1ed73cee8e2f0b62c6d6b7c03fde2e753d1c1e17866e1a8a

See more details on using hashes here.

File details

Details for the file rio_ui-0.5.16-py3-none-any.whl.

File metadata

  • Download URL: rio_ui-0.5.16-py3-none-any.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for rio_ui-0.5.16-py3-none-any.whl
Algorithm Hash digest
SHA256 b25ec7924b0e79ac8a8f5fb30a172da0686515ca5022eb310253aa3e86fda487
MD5 63bc97380ad9a0997299c1a6b7f687f4
BLAKE2b-256 03a6067e0020c89b8190b1c8da150bb47078aaa3b69d849f169b88cad3604236

See more details on using hashes here.

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