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.
- Deploy Instantly - After building, deploy your app with a single command or host it on your own server.
See our architecture page to learn how Reflex works under the hood.
⚙️ Installation
Open a terminal and run (Requires Python 3.9+):
pip install reflex
🥳 Create your first app
Installing reflex
also installs the reflex
command line tool.
Test that the install was successful by creating a new project. (Replace my_app_name
with your project name):
mkdir my_app_name
cd my_app_name
reflex init
This command initializes a template app in your new directory.
You can run this app in development mode:
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.