Skip to main content

ReactPy-Django

ReactPy-Django is used to add ReactPy support to an existing Django project. This package also turbocharges ReactPy with features such as...

What is ReactPy?

ReactPy is a library for building user interfaces in Python without Javascript. ReactPy interfaces are made from components that look and behave similar to those found in ReactJS. Designed with simplicity in mind, ReactPy can be used by those without web development experience while also being powerful enough to grow with your ambitions.

Supported Backends
Built-in External
Flask, FastAPI, Sanic, Tornado Django, Jupyter, Plotly-Dash

At a Glance

my_app/components.py

You will need a file to define your ReactPy components. We recommend creating a components.py file within your chosen Django app to start out. Within this file, we will create a simple hello_world component.

from reactpy import component, html

@component
def hello_world(recipient: str):
    return html.h1(f"Hello {recipient}!")

my_app/templates/my_template.html

In your Django app's HTML template, you can now embed your ReactPy component using the component template tag. Within this tag, you will need to type in the dotted path to the component.

Additionally, you can pass in args and kwargs into your component function. After reading the code below, pay attention to how the function definition for hello_world (from the previous example) accepts a recipient argument.

{% load reactpy %}
<!DOCTYPE html>
<html>
  <body>
    {% component "example_project.my_app.components.hello_world" recipient="World" %}
  </body>
</html>

Resources

Follow the links below to find out more about this project.

Metadata

Release files for reactpy_django 5.2.1

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

Source distribution (sdist)

Source distribution for reactpy_django 5.2.1
File Size Uploaded
reactpy_django-5.2.1.tar.gz 6.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for reactpy_django 5.2.1
File Interpreter ABI Platform
reactpy_django-5.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 MB

Release files / reactpy_django-5.2.1.tar.gz

Download URL reactpy_django-5.2.1.tar.gz
Size 6.8 MB
Tags Source
SHA-256 checksum
How to use checksums
ba0d221cef62cb8ecbe44756ccdac6855f4775f8c34c31db7400d9c8c6a58db4
BLAKE2b-256 checksum
How to use checksums
3ac3e7a282629246e60d41987ef6af0631c992c22679401685325a0cac241777
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release files / reactpy_django-5.2.1-py3-none-any.whl

Download URL reactpy_django-5.2.1-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
802d27d4bd7ff1292254b859963100bf1a326dea29713ad30db613c19bb81e18
BLAKE2b-256 checksum
How to use checksums
53627d7e4cbd8075b6a47c5e1e7b1f06c8a3c2f42c257fcdde9bf470b2bbabf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release history Release notifications | RSS feed

This release

5.2.1 This release

2 release files

5.2.0

2 release files

5.1.1

2 release files

5.1.0

2 release files

5.0.0

2 release files

4.0.0

2 release files

3.8.1

2 release files

3.8.0

2 release files

3.7.0

2 release files

3.6.0

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.0

2 release files

3.3.2

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.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