Reflex

The full-stack Python framework.

Build and deploy production web apps—frontend, backend, all in Python. Free and open source under Apache 2.0.

Try a live app. Read the Python.

Join Newsletter

Get the latest updates and news about Reflex.

import reflex as rx

class FormState(rx.State):

    @rx.event
    def submit(self, form_data: dict):
        return rx.toast("Thanks for your message, " + form_data["name"] + "!")

def form() -> rx.Component:
    return rx.card(
        rx.form(
            rx.hstack(
                rx.icon("mail", size=24, aria_label="Email envelope"),
                rx.vstack(
                    rx.heading("Join Newsletter"),
                    rx.text(
                        "Get the latest updates and news about Reflex.",
                    ),
                ),
            ),
            rx.vstack(
                rx.text(
                    "Name ",
                    rx.text.span("*", color="red"),
                ),
                rx.input(
                    name="name",
                    aria_label="Name",
                    required=True,
                ),
            ),
            rx.vstack(
                rx.text(
                    "Email ",
                    rx.text.span("*", color="red"),
                ),
                rx.input(
                    name="email",
                    aria_label="Email",
                    type="email",
                    required=True,
                ),
            ),
            rx.vstack(
                rx.text("Message"),
                rx.text_area(
                    name="message",
                    aria_label="Message",
                ),
            ),
            rx.button("Send", type="submit"),
            on_submit=FormState.submit,
        )
    )

app = rx.App()
app.add_page(form, route="/")

Run the Forms example in an initialized Reflex project. Other examples show patterns for integrations and external services.

Built with Reflex, across teams and industries

Read all stories
  • MAN
  • Dell
  • Fastly
  • PwC
  • UNICEF
  • Autodesk
  • Apple
  • Microsoft
  • Amazon
  • Atlassian
  • SellerX
  • Coupa
  • World Bank
  • IBM
  • Red Hat
  • Databricks

All in Python

One language. Full stack.

Build your entire app in Python—frontend and backend.

It's just Python

Your state is a Python class. Your event handlers are Python functions. If you know Python, you already know how to use Reflex.

A proven stack

You write Python. Reflex compiles to a React frontend and a Starlette backend—the ASGI server that powers FastAPI. A familiar web stack, accessible to every Python developer.

Your Python libraries