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.9.tar.gz (236.3 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.9-py3-none-any.whl (280.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reflex-0.9.9.tar.gz
  • Upload date:
  • Size: 236.3 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.9.tar.gz
Algorithm Hash digest
SHA256 cbd4e8566ece49ca5c0f034ac641814090c6d74154f0817c31e384578a0a91a0
MD5 3495a2db9817ebbdacf9cb5ae599d1cb
BLAKE2b-256 4b95f4b221a8ef719a8077d1c9587caa0f1c9463c558019f0075f92cd1f41269

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reflex-0.9.9-py3-none-any.whl
  • Upload date:
  • Size: 280.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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 03869c725fad01798c98a3e80c5177261d5d18a568e1ea5ce752669bebb73585
MD5 20f14631668bf67d9ba43672e805944a
BLAKE2b-256 edc0372305a7cef8c37cf18952cfe33025f02a7379d8e370ff523af9242368f6

See more details on using hashes here.

Release history Release notifications | RSS feed

0.9.10.post1

2 files

0.9.10

2 files

0.9.9.post1

2 files

This release

0.9.9 This release

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