Reflex is an open-source framework for quickly building beautiful, interactive web applications in pure Python.
On this page
Introduction
Reflex is an open-source framework for quickly building beautiful, interactive web applications in pure Python.
Getting Started
uv init appcd appuv init reflexInit the project
uv run reflex initThe command will return several template options to choose from as shown below.
Select “A blank Reflex app”
This will create a directory structure like this:
app├── .web├── assets├── app│ ├── __init__.py│ └── app.py└── rxconfig.pyInitializing your project creates a directory with the same name as your app. This is where you will write your app’s logic.
Reflex generates a default app within the app/app.py file. You can modify this file to customize your app.
Run it in development mode:
uv run reflex runYour app runs at http://localhost:3000.
Reflex prints logs to the terminal. To increase log verbosity to help with debugging, use the --loglevel flag:
uv run reflex run --loglevel debugReflex will hot reload any code changes in real time when running in development mode. Your code edits will show up on http://localhost:3000 automatically.
Counter
Create a simple counter app that lets the user count up or down as explained on Introduction
Basics
Pending
For a glimpse of the possibilities, check out these resources:
- For a more real-world example, check out either the dashboard tutorial or the chatapp tutorial.
- They have bots that can answer questions and generate Reflex code for you.