Skip to main content

trame-router enable multi-page navigation pypi_download

Test and Release

Trame-router extend trame widgets and ui with Vue Router components and helper to streamline its usage with trame. Vue Router is the official router for Vue.js on which trame is based.

Installing

trame-router can be installed with pip:

pip install trame-router

Development

# Create venv and install all dependencies
uv sync --all-extras --dev

# Activate environment
source .venv/bin/activate

# Install commit analysis
pre-commit install
pre-commit install --hook-type commit-msg

# Run pre-commit
pre-commit run --all-files

Usage

The Trame Tutorial is the place to go to learn how to use the library and start building your own application.

The API Reference documentation provides API-level documentation.

The original Vue Router documentation provide a great introduction resource.

The router elements can be used as follow in trame:

# [...]
from trame.ui.router import RouterViewLayout
from trame.widgets import router

with RouterViewLayout(server, "/"):
    with vuetify.VCard():
        vuetify.VCardTitle("This is home")

with RouterViewLayout(server, "/foo"):
    with vuetify.VCard():
        vuetify.VCardTitle("This is foo")

with RouterViewLayout(server, "/bar/:id"):
    with vuetify.VList():
        vuetify.VListItem("Bar {{ $route.params.id }} item 1")
        vuetify.VListItem("Bar {{ $route.params.id }} item 2")
        vuetify.VListItem("Bar {{ $route.params.id }} item 3")

with SinglePageWithDrawerLayout(server) as layout:
    with layout.toolbar:
        vuetify.VBtn("Home", to="/")
        vuetify.VBtn("Foo", to="/foo")
        vuetify.VBtn("Bar 1", to="/bar/1")
        vuetify.VBtn("Bar 2", to="/bar/2")
        vuetify.VBtn("Bar 3", to="/bar/3")

    with layout.content:
        router.RouterView()

Environment variables

With vue3 and docker, trame-router can leverage the html5 history mode but by default we use the “hash” mode. To enable it, you need to define a TRAME_ROUTER_HISTORY_MODE environment variable that should either be set to “html5” or “hash”. This can only work if using our docker bundle or with a proper web server configuration when delivering the static HTML/JS/CSS content yourself.

License

trame-router is made available under the MIT License. For more details, see LICENSE This license has been chosen to match the one use by Vue Router which is used under the cover.

Community

Trame | Discussions | Issues | Contact Us

https://zenodo.org/badge/410108340.svg

Enjoying trame?

Share your experience with a testimonial or with a brand approval.

JavaScript dependency

This Python package bundle the following vue-router libraries. For client_type="vue2", it exposes vue-router@3.5.1 and for client_type="vue3", it exposes vue-router@5.3.1. If you would like us to upgrade any of those dependencies, please reach out.

Metadata

Release files for trame-router 2.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trame-router 2.4.1
File Size Uploaded Provenance Actions
trame_router-2.4.1.tar.gz 324.8 kB With provenance Details for trame_router-2.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for trame-router 2.4.1
File Interpreter ABI Platform Actions
trame_router-2.4.1-py3-none-any.whl Python 3 none any Details for trame_router-2.4.1-py3-none-any.whl

Total release size: 656.5 kB

Release files / trame_router-2.4.1.tar.gz

Download URL trame_router-2.4.1.tar.gz
Size 324.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2d7ca326f79d7869f50d8564e5aee3b337a7334edbd6d212eda796432b355bd6
BLAKE2b-256 checksum
How to use checksums
5abc44298f5b6cf1dda51d2535e20cd84e981e07523da059f05c7dc0de5f31ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / trame_router-2.4.1-py3-none-any.whl

Download URL trame_router-2.4.1-py3-none-any.whl
Size 331.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5534e9497d603e8bbc113798c127ee1e55dbd37f03b3a0ce5cc6003da3c2f8b1
BLAKE2b-256 checksum
How to use checksums
b7591a9765d405f0f83b9550cd64512dd18229d1ecf915b3d3c8a473cdee15e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Security for trame-router 2.4.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for trame_router-2.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page