Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Reflex Logo

✨ Performant, customizable web apps in pure Python. Deploy in seconds. ✨

PyPI version versions Documentation PyPI Downloads Discord Twitter



Introduction

Reflex is a library to build full-stack web apps in pure Python.

Key features:

  • Pure Python - Write your app's frontend and backend all in Python, no need to learn Javascript.
  • Full Flexibility - Reflex is easy to get started with, but can also scale to complex apps.

See our architecture page to learn how Reflex works under the hood.

⚙️ Installation

Important: We strongly recommend using a virtual environment to ensure the reflex command is available in your PATH.

🥳 Create your first app

Create a project, add Reflex, and start the development server with uv:

mkdir my_app_name
cd my_app_name
uv init

uv add reflex
uv run reflex init
uv run reflex run

You should see your app running at http://localhost:3000.

Now you can modify the source code in my_app_name/my_app_name.py. Reflex has fast refreshes so you can see your changes instantly when you save your code.

🫧 Example App

Build an image generation app in Python with Reflex: define the UI, manage state in a class, and call an image model from an event handler.

import reflex as rx
import openai

client = openai.AsyncOpenAI()


class State(rx.State):
    prompt: str = ""
    image_url: str = ""
    processing: bool = False

    @rx.event
    def set_prompt(self, value: str):
        self.prompt = value

    @rx.event
    async def generate(self):
        self.processing = True
        yield
        response = await client.images.generate(
            model="gpt-image-1.5",
            prompt=self.prompt,
        )
        self.image_url = f"data:image/png;base64,{response.data[0].b64_json}"
        self.processing = False


def index():
    return rx.vstack(
        rx.heading("Image Generator"),
        rx.input(placeholder="Enter a prompt...", on_change=State.set_prompt),
        rx.button("Generate", on_click=State.generate, loading=State.processing),
        rx.image(src=State.image_url),
    )


app = rx.App()
app.add_page(index, title="Reflex:Image Generation")

All Thanks To Our Contributors:

Metadata

Release files for reflex 0.11.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reflex 0.11.0a1
File Size Uploaded Provenance Actions
reflex-0.11.0a1.tar.gz 290.4 kB Without provenance Details for reflex-0.11.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reflex 0.11.0a1
File Interpreter ABI Platform Actions
reflex-0.11.0a1-py3-none-any.whl Python 3 none any Details for reflex-0.11.0a1-py3-none-any.whl

Total release size: 624.5 kB

Release files / reflex-0.11.0a1.tar.gz

Download URL reflex-0.11.0a1.tar.gz
Size 290.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e8a650c2c27d22517aebd31d240a7566c7c90a7cc857320e6402836654f47831
BLAKE2b-256 checksum
How to use checksums
cac235e37054663fcfc6478d0d2148ec6e24cdfd53fd9a4a5f152bbad3f49d63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / reflex-0.11.0a1-py3-none-any.whl

Download URL reflex-0.11.0a1-py3-none-any.whl
Size 334.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ebe1d438b38c00acf8a81ef8207335b137dd3669258d27b90292cf90d855dc3
BLAKE2b-256 checksum
How to use checksums
b2ca1705d3f535ab2234e5fc6eb4c498cbca40fc5fc75debde61e79e4bcb6c2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for reflex 0.11.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page