https://github.com/krmax44/vue-ssr-python
Python and Django client for vue-ssr-service
https://github.com/krmax44/vue-ssr-python
django django-vue server-side-rendering ssr vue
Last synced: about 1 month ago
JSON representation
Python and Django client for vue-ssr-service
- Host: GitHub
- URL: https://github.com/krmax44/vue-ssr-python
- Owner: krmax44
- License: mit
- Created: 2025-05-18T20:34:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-29T16:08:35.000Z (about 1 year ago)
- Last Synced: 2025-09-18T22:15:40.002Z (9 months ago)
- Topics: django, django-vue, server-side-rendering, ssr, vue
- Language: Python
- Homepage: https://krmax44.github.io/vue-ssr-python/vue_ssr.html
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vue Server-Side Rendering in Python
[](https://github.com/krmax44/vue-ssr-python/actions/workflows/test.yaml)
[](https://pypi.org/project/vue-ssr/)
[](https://krmax44.github.io/vue-ssr-python/vue_ssr.html)
Client for [`vue-ssr-service`](https://github.com/krmax44/vue-ssr-service). See its documentation for a [quick start guide](https://github.com/krmax44/vue-ssr-service#getting-started-with-vite).
> [!WARNING]
> This project is in a proof-of-concept state.
## Stand-alone
```python
from vue_ssr import ServerRenderer
renderer = ServerRenderer()
renderer.render("myComponent", props={"name": "friend"})
# "
Hello, friend!
"
```
## With Django
Works well in conjunction with [`django-vite`](https://github.com/MrBin99/django-vite). Add it to your installed apps:
```py
INSTALLED_APPS = [
"vue_ssr",
...
]
```
Then, you can simply use the provided template tag:
```django
{% load vue_ssr %}
{% render_vue "userGreeting" name=request.user.username %}
```
Or pass a dict with props:
```django
{% render_vue "myApp" props=props %}
```