ReactPy-Django
ReactPy-Django is used to add ReactPy support to an existing Django project. This package also turbocharges ReactPy with features such as...
- SEO compatible rendering
- Client-Side Python components
- Single page application (SPA) capabilities
- Distributed computing
- Performance enhancements
- Customizable reconnection behavior
- Customizable disconnection behavior
- Multiple root components
- Cross-process communication/signaling
- Django view to ReactPy component conversion
- Django form to ReactPy component conversion
- Django static file access
- Django database access
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| reactpy_django-5.2.1.tar.gz | 6.8 MB | Without provenance | Details for reactpy_django-5.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| reactpy_django-5.2.1-py3-none-any.whl | Python 3 | none | any | Details for reactpy_django-5.2.1-py3-none-any.whl |
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
|
Security for reactpy_django 5.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.