Skip to main content

Render Vue components on the server side

Project description

Vue Server-Side Rendering in Python

Test Workflow PyPI - Version API documentation

Client for vue-ssr-service. See its documentation for a quick start guide.

[!WARNING] This project is in a proof-of-concept state.

Stand-alone

from vue_ssr import ServerRenderer

renderer = ServerRenderer()
renderer.render("myComponent", props={"name": "friend"})
# "<p>Hello, friend!</p>"

With Django

Works well in conjunction with django-vite. Add it to your installed apps:

INSTALLED_APPS = [
  "vue_ssr",
  ...
]

Then, you can simply use the provided template tag:

{% load vue_ssr %}
<user-greeting>{% render_vue "userGreeting" name=request.user.username %}</user-greeting>

Or pass a dict with props:

<my-app>{% render_vue "myApp" props=props %}</my-app>

Project details


Download files

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

Source Distribution

vue_ssr-0.1.0.tar.gz (51.9 kB view details)

Uploaded Source

Built Distribution

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

vue_ssr-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file vue_ssr-0.1.0.tar.gz.

File metadata

  • Download URL: vue_ssr-0.1.0.tar.gz
  • Upload date:
  • Size: 51.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for vue_ssr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 028188a2d39213b2d55debbbc91ea89155899b6152e78eead2d9ffd48650447a
MD5 f821397e8cc39b182546da6159304fd6
BLAKE2b-256 14f745eab9aa3a2ff56fcb40e28775e326e77acd79faa747087924b5664ba3e5

See more details on using hashes here.

File details

Details for the file vue_ssr-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vue_ssr-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for vue_ssr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fae86d17fd40d36e6acb02d843717c63a15fe2f5bad8409b1b9de9f09fc0c779
MD5 364eea071e33381ae8e10d9888d939ed
BLAKE2b-256 3fe5c5aa05581535becb492216c4c3fa418796424cd2619bf9a3daedea9d9d9c

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 Pingdom Monitoring Sentry Error logging StatusPage Status page