Skip to content

reflex-django logo

reflex-django

Unify the robust backend power of Django and the highly interactive, Python-first reactive UI of Reflex into a single process.

PyPI package Supported Python Versions License


Welcome to the official documentation for reflex-django!

This library acts as a bridge that brings Django ASGI and Reflex together in one process started by the single standard command: reflex run.

By combining the strength of Django's robust ecosystem (its ORM, administrative panel, session store, migration framework, and URL routing) with Reflex's fast, modern, reactive user interfaces, you get a premium developer experience. You no longer need to run, configure, and maintain separate backend and frontend development servers.

Whether you are starting a new greenfield application or looking to mount a highly interactive modern web interface onto an existing enterprise Django codebase, reflex-django is built to scale with your architectural needs.


Choose your path


Quick Installation

Get up and running immediately. You can install reflex-django directly from PyPI using your favorite package manager:

uv add reflex-django
pip install reflex-django

Learning Path

We recommend exploring the documentation in this structured sequence to get a complete grasp of the integration:

  1. Foundations

    • Introduction — Core concepts, philosophy, and comparison.
    • Installation — Dependencies, Django setup, and basic plugin configuration.
    • Configuration — Deep dive into the ReflexDjangoPlugin arguments and REFLEX_DJANGO_* settings.
    • Project Structure — Recommended folder layouts for monorepo development.
  2. Core Architecture

  3. State, Context & Auth

  4. Database & CRUD Development

  5. Ops & Development

    • Command Line Interface — Leveraging the reflex django wrapper.
    • Testing Guide — Writing unit and integration tests.
    • Deployment Guide — Production configurations, static files, and environment requirements.
    • Best Practices — Guidelines for writing clean, performant, and secure apps.
    • FAQ — Answers to frequently asked questions.

Core Task Guide

Need to solve a specific problem? Check out these direct guides:

What do you want to do? Recommended Guide
Configure Django settings and paths Configuration Guide
Run Django database migrations CLI Reference
Access Django sessions and request.user in event handlers Session Authentication
Switch language, detect RTL, serve translated strings in Reflex Internationalization (i18n)
Read raw query parameters (GET/POST) or cookies in state Authentication — Accessing Request
Create a list, create, edit, or delete UI for a database model Reactive ModelState or CRUD Without Mixins
Serialize database models into React-friendly dictionaries Serializers Reference
Integrate DRF or standard Django HTTP views alongside the SPA API & HTTP Integration
Deploy your unified app to a production server Deployment Guide
Debug anonymous user sessions or authentication problems FAQ

Maintainer Docs

To help maintain or contribute to the library:


Navigation: Introduction →