Skip to main content
Reflex Logo

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

PyPI version versions Documentation PyPI Downloads Discord Twitter


[!NOTE] Build faster with Reflex:


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:

Download files

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

Source Distribution

reflex-0.9.11.tar.gz (246.7 kB view details)

Uploaded Source

Built Distribution

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

reflex-0.9.11-py3-none-any.whl (290.9 kB view details)

Uploaded Python 3

File details

Details for the file reflex-0.9.11.tar.gz.

File metadata

  • Download URL: reflex-0.9.11.tar.gz
  • Upload date:
  • Size: 246.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for reflex-0.9.11.tar.gz
Algorithm Hash digest
SHA256 cb0ef4928f69376c4895b73c51defd637201f699db125a0da5ed600323fbcac7
MD5 43bb3a2bc077cf78420514dd08ee3130
BLAKE2b-256 322a745f1a47575b930cf320154ef09a68e8782584fec73102a7d330c08ddce5

See more details on using hashes here.

File details

Details for the file reflex-0.9.11-py3-none-any.whl.

File metadata

  • Download URL: reflex-0.9.11-py3-none-any.whl
  • Upload date:
  • Size: 290.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for reflex-0.9.11-py3-none-any.whl
Algorithm Hash digest
SHA256 09fa719dd286b56a0377cf5864a8b2abc7c303d649b017de236daac60973c4a6
MD5 a43a7f4f810c0b45c3546e92ca2f0ba3
BLAKE2b-256 99192a0176ab3be3c528a485369e3d3070e64604b3fe699b67367ea848f9ca7d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.9.11 This release

2 files

0.9.10.post2

2 files

0.9.10.post1

2 files

0.9.10

2 files

0.9.9.post1

2 files

0.9.9

2 files

0.9.8.post1

2 files

0.9.8

2 files

0.9.7

2 files

0.9.6.post2

2 files

0.9.6.post1

2 files

0.9.6

2 files

0.9.5.post2

2 files

0.9.5.post1

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2.post2

2 files

0.9.2.post1

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0.post1

2 files

0.9.0

2 files

0.8.28.post1

2 files

0.8.28

2 files

0.8.27

2 files

0.8.26

2 files

0.8.25

2 files

0.8.24.post1

2 files

0.8.24

2 files

0.8.23

2 files

0.8.22

2 files

0.8.21

2 files

0.8.20

2 files

0.8.19

2 files

0.8.18

2 files

0.8.17

2 files

0.8.16

2 files

0.8.15

2 files

0.8.14.post1

2 files

0.8.14

2 files

0.8.13

2 files

0.8.12

2 files

0.8.11

2 files

0.8.10

2 files

0.8.9

2 files

0.8.8

2 files

0.8.7

2 files

0.8.6

2 files

0.8.5

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1.post1

2 files

0.8.1

2 files

0.8.0.post1

2 files

0.8.0

2 files

0.7.14

2 files

0.7.13

2 files

0.7.12

2 files

0.7.11

2 files

0.7.10.post1

2 files

0.7.10

2 files

0.7.9.post1

2 files

0.7.9

1 file

0.7.8.post1

2 files

0.7.8

2 files

0.7.7.post1

2 files

0.7.7

2 files

0.7.6.post1

2 files

0.7.6

2 files

0.7.5.post1

2 files

0.7.5

2 files

0.7.4.post1

2 files

0.7.4

2 files

0.7.3.post1

2 files

0.7.3

2 files

0.7.2.post1

2 files

0.7.2

2 files

0.7.1.post1

2 files

0.7.1

2 files

0.7.0.post1

2 files

0.7.0

2 files

0.6.8.post1

2 files

0.6.8

2 files

0.6.7

2 files

0.6.6.post3

2 files

0.6.6.post2

2 files

0.6.6.post1

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3.post1

2 files

0.6.3

2 files

0.6.2.post1

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.10.post1

2 files

0.5.10

2 files

0.5.9

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0.post1

2 files

0.5.0

2 files

0.4.9.post1

2 files

0.4.9

2 files

0.4.8.post1

2 files

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.10

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

1 file

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.34

2 files

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