Skip to main content

reflex-django

Keep Django. Get a reactive UI in Python. One command, shared cookies, native Reflex dev.

PyPI Python Docs License

Documentation · LLM guide · GitHub · PyPI


What is reflex-django?

reflex-django is a Reflex plugin that runs your Django project and Reflex UI together. You keep Django for models, admin, auth, and APIs. You build the frontend in Python with Reflex components and state.

One dev command (reflex run) starts both sides. Sessions and cookies are shared, so a user logged in through Django is logged in on Reflex pages. Event handlers on Django-aware state read self.request.user like a Django view when bridge is enabled and the resolved tier binds request context.

The plugin wires four pieces automatically (embed, mount, proxy, bridge). Set profile: "integrated" in rxconfig.py and you get port 3000 dev, SPA routing, and Django middleware on bridge-bound Reflex events.

Install

uv add reflex-django

Or with pip (you also need Django and Reflex):

pip install reflex-django django reflex

New project with uv:

uv add django reflex reflex-django

Quick start

rxconfig.py:

import reflex as rx
from reflex_django.plugins import ReflexDjangoPlugin

config = rx.Config(
    app_name="shop",
    plugins=[
        ReflexDjangoPlugin(config={
            "settings_module": "config.settings",
            "profile": "integrated",
        }),
    ],
)

Then:

  1. Add reflex_django to INSTALLED_APPS and put AsyncStreamingMiddleware last in MIDDLEWARE (full setup)
  2. Create shop/shop.py with app = rx.App() and app.add_page(...) (pages and state)
  3. Run reflex django migrate and reflex run
  4. Open http://localhost:3000/

Learn each integration piece step by step →

API guides: Serializers · Model state · Forms/FieldSpec · Live updates · Devtools · Auth · Security · Config


Commands

reflex run
reflex export
reflex django migrate
reflex django makemigrations
reflex django createsuperuser
reflex django scaffold shop.Product --output shop/product_views.py

Requirements

Version
reflex-django 4.0+
Python 3.12+
Django 6.0+
Reflex >=0.9.4,<1.0

Author: Mohannad Irshedat · Docs

Metadata

Release files for reflex-django 4.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reflex-django 4.0.3
File Size Uploaded
reflex_django-4.0.3.tar.gz 249.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for reflex-django 4.0.3
File Interpreter ABI Platform
reflex_django-4.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 496.6 kB

Release files / reflex_django-4.0.3.tar.gz

Download URL reflex_django-4.0.3.tar.gz
Size 249.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4fe6d5dfcce576baefaa56917bbbe9e13ab497b182b6beae2a12218409d316d0
BLAKE2b-256 checksum
How to use checksums
51594ddb69f4bfc5eab78e4c54ee57c79cf33d718d03164ec6bc8cd9b8111412
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / reflex_django-4.0.3-py3-none-any.whl

Download URL reflex_django-4.0.3-py3-none-any.whl
Size 246.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e86a7bfde6a5ad5e5be64b1acb98bddcd8f8cc53bd40dc979dd08159d913c1c
BLAKE2b-256 checksum
How to use checksums
1c325d07f1aa41d1b0f2de9307f8f814c71a33a3cc545fd2a6f808f07e1d88a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

4.0.3 This release

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.0

2 release files

0.5.0

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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