reactpy_django 3.8.1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. js/node_modules/flatted/python/flatted.py +149 -0
  2. js/node_modules/flatted/python/test.py +63 -0
  3. reactpy_django/__init__.py +28 -0
  4. reactpy_django/apps.py +11 -0
  5. reactpy_django/checks.py +542 -0
  6. reactpy_django/clean.py +141 -0
  7. reactpy_django/components.py +286 -0
  8. reactpy_django/config.py +135 -0
  9. reactpy_django/database.py +31 -0
  10. reactpy_django/decorators.py +101 -0
  11. reactpy_django/exceptions.py +34 -0
  12. reactpy_django/hooks.py +496 -0
  13. reactpy_django/http/__init__.py +0 -0
  14. reactpy_django/http/urls.py +18 -0
  15. reactpy_django/http/views.py +62 -0
  16. reactpy_django/management/__init__.py +0 -0
  17. reactpy_django/management/commands/__init__.py +0 -0
  18. reactpy_django/management/commands/clean_reactpy.py +37 -0
  19. reactpy_django/migrations/0001_initial.py +25 -0
  20. reactpy_django/migrations/0002_rename_created_at_componentparams_last_accessed.py +17 -0
  21. reactpy_django/migrations/0003_componentsession_delete_componentparams.py +28 -0
  22. reactpy_django/migrations/0004_config.py +27 -0
  23. reactpy_django/migrations/0005_alter_componentsession_last_accessed.py +17 -0
  24. reactpy_django/migrations/0006_userdatamodel.py +28 -0
  25. reactpy_django/migrations/__init__.py +0 -0
  26. reactpy_django/models.py +48 -0
  27. reactpy_django/py.typed +1 -0
  28. reactpy_django/router/__init__.py +5 -0
  29. reactpy_django/router/converters.py +7 -0
  30. reactpy_django/router/resolvers.py +58 -0
  31. reactpy_django/static/reactpy_django/client.js +1630 -0
  32. reactpy_django/templates/reactpy/component.html +27 -0
  33. reactpy_django/templatetags/__init__.py +0 -0
  34. reactpy_django/templatetags/reactpy.py +221 -0
  35. reactpy_django/types.py +121 -0
  36. reactpy_django/utils.py +384 -0
  37. reactpy_django/websocket/__init__.py +0 -0
  38. reactpy_django/websocket/consumer.py +218 -0
  39. reactpy_django/websocket/paths.py +17 -0
  40. reactpy_django-3.8.1.dist-info/LICENSE.md +9 -0
  41. reactpy_django-3.8.1.dist-info/METADATA +152 -0
  42. reactpy_django-3.8.1.dist-info/RECORD +44 -0
  43. reactpy_django-3.8.1.dist-info/WHEEL +6 -0
  44. reactpy_django-3.8.1.dist-info/top_level.txt +2 -0
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.1
2
+ Name: reactpy_django
3
+ Version: 3.8.1
4
+ Summary: It's React, but in Python. Now with Django integration.
5
+ Home-page: https://github.com/reactive-python/reactpy-django
6
+ Author: Mark Bakhit
7
+ Author-email: archiethemonger@gmail.com
8
+ License: MIT
9
+ Keywords: interactive,reactive,widgets,DOM,React,ReactJS,ReactPy
10
+ Platform: Linux
11
+ Platform: Mac OS X
12
+ Platform: Windows
13
+ Classifier: Framework :: Django
14
+ Classifier: Framework :: Django :: 4.0
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Intended Audience :: Developers
21
+ Classifier: Intended Audience :: Science/Research
22
+ Classifier: Topic :: Multimedia :: Graphics
23
+ Classifier: Environment :: Web Environment
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE.md
27
+ Requires-Dist: channels >=4.0.0
28
+ Requires-Dist: django >=4.2.0
29
+ Requires-Dist: reactpy <1.1.0,>=1.0.2
30
+ Requires-Dist: reactpy-router <1.0.0,>=0.1.1
31
+ Requires-Dist: aiofile >=3.0
32
+ Requires-Dist: dill >=0.3.5
33
+ Requires-Dist: orjson >=3.6.0
34
+ Requires-Dist: nest-asyncio >=1.5.0
35
+ Requires-Dist: typing-extensions
36
+
37
+ # <img src="https://raw.githubusercontent.com/reactive-python/reactpy/main/branding/svg/reactpy-logo-square.svg" align="left" height="45"/> ReactPy Django
38
+
39
+ <p>
40
+ <a href="https://github.com/reactive-python/reactpy-django/actions?query=workflow%3ATest">
41
+ <img src="https://github.com/reactive-python/reactpy-django/workflows/Test/badge.svg?event=push">
42
+ </a>
43
+ <a href="https://pypi.python.org/pypi/reactpy-django">
44
+ <img src="https://img.shields.io/pypi/v/reactpy-django.svg?label=PyPI">
45
+ </a>
46
+ <a href="https://github.com/reactive-python/reactpy-django/blob/main/LICENSE.md">
47
+ <img src="https://img.shields.io/badge/License-MIT-purple.svg">
48
+ </a>
49
+ <a href="https://reactive-python.github.io/reactpy-django/">
50
+ <img src="https://img.shields.io/website?down_message=offline&label=Docs&logo=read%20the%20docs&logoColor=white&up_message=online&url=https%3A%2F%2Freactive-python.github.io%2Freactpy-django%2F">
51
+ </a>
52
+ <a href="https://discord.gg/uNb5P4hA9X">
53
+ <img src="https://img.shields.io/discord/1111078259854168116?label=Discord&logo=discord">
54
+ </a>
55
+ </p>
56
+
57
+ [ReactPy-Django](https://github.com/reactive-python/reactpy-django) is used to add [ReactPy](https://reactpy.dev/) support to an existing **Django project**. This package also turbocharges ReactPy with features such as...
58
+
59
+ - [SEO compatible rendering](https://reactive-python.github.io/reactpy-django/latest/reference/settings/#reactpy_prerender)
60
+ - [Single page application (SPA) capabilities](https://reactive-python.github.io/reactpy-django/latest/reference/router/#django-router)
61
+ - [Distributed computing](https://reactive-python.github.io/reactpy-django/latest/reference/settings/#reactpy_default_hosts)
62
+ - [Performance enhancements](https://reactive-python.github.io/reactpy-django/latest/reference/settings/#performance-settings)
63
+ - [Customizable reconnection behavior](https://reactive-python.github.io/reactpy-django/latest/reference/settings/#stability-settings)
64
+ - [Customizable disconnection behavior](https://reactive-python.github.io/reactpy-django/latest/reference/template-tag)
65
+ - [Multiple root components](https://reactive-python.github.io/reactpy-django/latest/reference/template-tag/)
66
+ - [Cross-process communication/signaling (Channel Layers)](https://reactive-python.github.io/reactpy-django/latest/reference/hooks/#use-channel-layer)
67
+ - [Django view to ReactPy component conversion](https://reactive-python.github.io/reactpy-django/latest/reference/components/#view-to-component)
68
+ - [Django static file access](https://reactive-python.github.io/reactpy-django/latest/reference/components/#django-css)
69
+ - [Django database access](https://reactive-python.github.io/reactpy-django/latest/reference/hooks/#use-query)
70
+
71
+ ## What is ReactPy?
72
+
73
+ [ReactPy](https://reactpy.dev/) 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](https://reactjs.org/). 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.
74
+
75
+ <table align="center">
76
+ <thead>
77
+ <tr>
78
+ <th colspan="2" style="text-align: center">Supported Backends</th>
79
+ <tr>
80
+ <th style="text-align: center">Built-in</th>
81
+ <th style="text-align: center">External</th>
82
+ </tr>
83
+ </thead>
84
+ <tbody>
85
+ <tr>
86
+ <td>
87
+ <a href="https://reactpy.dev/docs/guides/getting-started/installing-reactpy.html#officially-supported-servers">
88
+ Flask, FastAPI, Sanic, Tornado
89
+ </a>
90
+ </td>
91
+ <td>
92
+ <a href="https://github.com/reactive-python/reactpy-django">Django</a>,
93
+ <a href="https://github.com/reactive-python/reactpy-jupyter">Jupyter</a>,
94
+ <a href="https://github.com/idom-team/idom-dash">Plotly-Dash</a>
95
+ </td>
96
+ </tr>
97
+ </tbody>
98
+ </table>
99
+
100
+ # At a Glance
101
+
102
+ ## `my_app/components.py`
103
+
104
+ <!--py-header-start-->
105
+
106
+ You will need a file to define your [ReactPy](https://github.com/reactive-python/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.
107
+
108
+ <!--py-header-end-->
109
+ <!--py-code-start-->
110
+
111
+ ```python
112
+ from reactpy import component, html
113
+
114
+ @component
115
+ def hello_world(recipient: str):
116
+ return html.h1(f"Hello {recipient}!")
117
+ ```
118
+
119
+ <!--py-code-end-->
120
+
121
+ ## [`my_app/templates/my-template.html`](https://docs.djangoproject.com/en/dev/topics/templates/)
122
+
123
+ <!--html-header-start-->
124
+
125
+ 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.
126
+
127
+ 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.
128
+
129
+ <!--html-code-start-->
130
+
131
+ ```jinja
132
+ {% load reactpy %}
133
+ <!DOCTYPE html>
134
+ <html>
135
+ <body>
136
+ {% component "example_project.my_app.components.hello_world" recipient="World" %}
137
+ </body>
138
+ </html>
139
+ ```
140
+
141
+ <!--html-code-end-->
142
+
143
+ # Resources
144
+
145
+ Follow the links below to find out more about this project.
146
+
147
+ - [Try ReactPy (Jupyter Notebook)](https://mybinder.org/v2/gh/reactive-python/reactpy-jupyter/main?urlpath=lab/tree/notebooks/introduction.ipynb)
148
+ - [Documentation](https://reactive-python.github.io/reactpy-django)
149
+ - [GitHub Discussions](https://github.com/reactive-python/reactpy-django/discussions)
150
+ - [Discord](https://discord.gg/uNb5P4hA9X)
151
+ - [Contributor Guide](https://reactive-python.github.io/reactpy-django/latest/about/code/)
152
+ - [Code of Conduct](https://github.com/reactive-python/reactpy-django/blob/main/CODE_OF_CONDUCT.md)
@@ -0,0 +1,44 @@
1
+ js/node_modules/flatted/python/flatted.py,sha256=ke8FuEflns-WlphCcQ9CC0qJqWqX3zEEuak74o6rgE8,3879
2
+ js/node_modules/flatted/python/test.py,sha256=uTOn6HJd7KeY_PTRvvufv60dmvON3KWp3nnqACj8IlA,2129
3
+ reactpy_django/__init__.py,sha256=O8gOY0MbEpJ3662cYBxlVwnOaLNVcfeaASiuFnjnEyU,750
4
+ reactpy_django/apps.py,sha256=kFnO9luEKN5QPHaTGmnZg087Aoahl4RJsiu-NoDuwuI,279
5
+ reactpy_django/checks.py,sha256=2Mcl9TymbTQwFr-RsUyYRuz1Zr7nTilW4RiJHYppTHQ,20457
6
+ reactpy_django/clean.py,sha256=qU3oZQLvaml4KMZdXuNjcblnB-V17wprAr8L_gqfNF4,4687
7
+ reactpy_django/components.py,sha256=-HTvtd0z7VmsIShS-QB_EZNa6BfoFPUP-7PB1uxyD28,9273
8
+ reactpy_django/config.py,sha256=Fp78Fbini-NL_OLN-ilKAbpeOM8wwWtlJJbVXLi_VV4,3443
9
+ reactpy_django/database.py,sha256=G-HIQDi5ADT5hSDbdk3cLEgYHgqnXf9fXaxF26jmokU,1112
10
+ reactpy_django/decorators.py,sha256=aDGODLJxtmthKZjbjQ6q5zMy9BTOaC1uTZJYS-IdLSE,3672
11
+ reactpy_django/exceptions.py,sha256=HDXMyvVDTQMetACFRy3TS4f-NPxBw261qgcgJX41FLE,476
12
+ reactpy_django/hooks.py,sha256=ngzj_dRaE0nVJr9qrjCqIDwbSaoxl-jb-NPSTRD1D84,17150
13
+ reactpy_django/models.py,sha256=W1k8nMqK_ihNaBeFan7FmFNHRjEVBl0myokyklgjX6Y,1711
14
+ reactpy_django/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
15
+ reactpy_django/types.py,sha256=fhNod-eYbL6jRzaV1inCvUzdZf9iz7jXqXY7as01Am0,3378
16
+ reactpy_django/utils.py,sha256=5m1IPU0CTljfmRqafiL9AbSk0_bE4tzjy56Yu8F-Y7s,13678
17
+ reactpy_django/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ reactpy_django/http/urls.py,sha256=jmho30KjrBNqS-mw__7IryvctTBPVhLEJOSOoLPkyPE,316
19
+ reactpy_django/http/views.py,sha256=jgPeC0PFuI1AAOR-_yr4WMhk2Zb2Pj-GOwp_bWEqvVg,2453
20
+ reactpy_django/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
+ reactpy_django/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
+ reactpy_django/management/commands/clean_reactpy.py,sha256=EbOxl92yJmdM1NCGTCU_bx1JzJp2FtQJkPQ7lW4JNhs,1260
23
+ reactpy_django/migrations/0001_initial.py,sha256=7oV8X85sZWkDSEIL9NicNhfBD8or1vuzC2ygesTitK4,648
24
+ reactpy_django/migrations/0002_rename_created_at_componentparams_last_accessed.py,sha256=j_VvXjuCIyTSnGMcN6uNwolJBf_roTCiZnVgLn2ROmo,378
25
+ reactpy_django/migrations/0003_componentsession_delete_componentparams.py,sha256=sQUNxM1EQwBVICcyUhcAL1gLLF_HrneYlYjpK43-am0,802
26
+ reactpy_django/migrations/0004_config.py,sha256=33I_cjO5Z3CBwijopTzehJfjawYFHMC5I0R5KbNq_ZA,735
27
+ reactpy_django/migrations/0005_alter_componentsession_last_accessed.py,sha256=X0pxB3MNpu_HSG180b1CZCUavVeUi5IQp1wGuXuEt0E,401
28
+ reactpy_django/migrations/0006_userdatamodel.py,sha256=cDh234dNmMQZWen705XlmkWUDdOEeUWme_MgI72aXGg,811
29
+ reactpy_django/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
+ reactpy_django/router/__init__.py,sha256=PO1Sp6V_b4D0IYB0mkJiRWkXKLyDB2PON6FfJ7rUeYA,153
31
+ reactpy_django/router/converters.py,sha256=EfBtM2e7P5_SSHU_yn7wI4fR-aCizdkEdEQfHJJNNh4,262
32
+ reactpy_django/router/resolvers.py,sha256=u-rrN5GdH-0pVjvuNG7yejyPbycA25HG7GhbpbSRKfM,2156
33
+ reactpy_django/static/reactpy_django/client.js,sha256=M4SNSJUqMIyGhmc_4ZYEJyGhzUNgX4gfvVSFjr8uRDQ,173276
34
+ reactpy_django/templates/reactpy/component.html,sha256=GMdhL_AHQhq_3hycHMiqWg2uZCVD1sUWdZp5BUqPciY,1201
35
+ reactpy_django/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
+ reactpy_django/templatetags/reactpy.py,sha256=MNj-4RzU1fWeZHc8WGgcDhPO7vQ_4njiJbaPhJ_o58w,8291
37
+ reactpy_django/websocket/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
+ reactpy_django/websocket/consumer.py,sha256=HFzmM8w3tT1fsOerN6ziyaqMATix-s_0YZQK1jWqaOM,8212
39
+ reactpy_django/websocket/paths.py,sha256=CRNKaH4GcqL7s6SkXgfHj0gN0a-m8wCQx4_9qPDd-0c,520
40
+ reactpy_django-3.8.1.dist-info/LICENSE.md,sha256=3X8Yi_UBFeSYAEJzKlwLRyiROzolmO7NOy6NXpTs_H8,1101
41
+ reactpy_django-3.8.1.dist-info/METADATA,sha256=aqOa5LSOvGYzSi0Iyg3DuTau4dzO2RsSRtqvyXO4X8w,7200
42
+ reactpy_django-3.8.1.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
43
+ reactpy_django-3.8.1.dist-info/top_level.txt,sha256=H5UQq1TZo4mOoKE7rJ5VLosnT0Ys5NEusvDWuaaYcJQ,18
44
+ reactpy_django-3.8.1.dist-info/RECORD,,
@@ -0,0 +1,6 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.43.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py2-none-any
5
+ Tag: py3-none-any
6
+
@@ -0,0 +1,2 @@
1
+ js
2
+ reactpy_django