+ Firsts steps with Reflex. +
English | 简体中文 | 繁體中文 | Türkçe | हिंदी | Português (Brasil) | Italiano | Español | 한국어 | 日本語
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.
Open a terminal and run (Python 3.8+):
pip install reflex
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
python -m venv .venv
.venv\Scripts\activate
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 link_bio_web/link_bio_web.py
. Reflex has fast refreshes so you can see your changes instantly when you save your code (WSL).
Let's go over an example: creating an image generation UI around DALL·E. For simplicity, we just call the OpenAI API, but you could replace this with an ML model run locally.