Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.

<!DOCTYPE html>
{% load reactpy %}
<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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reactpy_django-6.0.0b1.tar.gz (6.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reactpy_django-6.0.0b1-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file reactpy_django-6.0.0b1.tar.gz.

File metadata

  • Download URL: reactpy_django-6.0.0b1.tar.gz
  • Upload date:
  • Size: 6.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.1 {"ci":true,"cpu":"x86_64","distro":{"id":"noble","libc":{"lib":"glibc","version":"2.39"},"name":"Ubuntu","version":"24.04"},"implementation":{"name":"CPython","version":"3.14.6"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.0.13 30 Jan 2024","python":"3.14.6","system":{"name":"Linux","release":"6.17.0-1018-azure"}} HTTPX2/2.7.0

File hashes

Hashes for reactpy_django-6.0.0b1.tar.gz
Algorithm Hash digest
SHA256 3cdcb0d0a827aedb5002c63ae991995db05b7458336ecc973c65fc3939509501
MD5 54ffc24550a5b51f34b0212addc254ec
BLAKE2b-256 0c576fda08393f9261fa421b6104e5343e05d1af5bba203e14994994ea20119c

See more details on using hashes here.

File details

Details for the file reactpy_django-6.0.0b1-py3-none-any.whl.

File metadata

  • Download URL: reactpy_django-6.0.0b1-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.1 {"ci":true,"cpu":"x86_64","distro":{"id":"noble","libc":{"lib":"glibc","version":"2.39"},"name":"Ubuntu","version":"24.04"},"implementation":{"name":"CPython","version":"3.14.6"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.0.13 30 Jan 2024","python":"3.14.6","system":{"name":"Linux","release":"6.17.0-1018-azure"}} HTTPX2/2.7.0

File hashes

Hashes for reactpy_django-6.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 24c285d68944f94f8dbc26b5f9e73ac910de3c3b424ae78daedaade25e197139
MD5 c58a23f042ded71871109096872482b9
BLAKE2b-256 528bf3cf9e6daec2fff1f675d062ad7a5a195b02303089244fe341b628c7a48b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page