Skip to main content

Vue Router widgets for trame

Project description

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 --upgrade trame-router

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()

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 | RoadMap | Contact Us

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

Enjoying trame?

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

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

trame-router-2.2.0.tar.gz (45.4 kB view details)

Uploaded Source

Built Distribution

trame_router-2.2.0-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file trame-router-2.2.0.tar.gz.

File metadata

  • Download URL: trame-router-2.2.0.tar.gz
  • Upload date:
  • Size: 45.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/43.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.2.1 tqdm/4.66.2 importlib-metadata/7.1.0 keyring/25.0.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.14

File hashes

Hashes for trame-router-2.2.0.tar.gz
Algorithm Hash digest
SHA256 7958924c414497722eb3cbad32f0f92638ea262cff97a3bcab985a87146bfb1a
MD5 a0d520858c043b8a72b22c4f64086249
BLAKE2b-256 df8935c026e07f0950f6d21c539e6979725b50803907a85c2ccde0ba463c5e59

See more details on using hashes here.

File details

Details for the file trame_router-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: trame_router-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 46.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/43.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.2.1 tqdm/4.66.2 importlib-metadata/7.1.0 keyring/25.0.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.14

File hashes

Hashes for trame_router-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b66c5854c41bd421f39e28fe28bc33b536cb5839ff7d842030e54d3c7d7b5b3a
MD5 5085189a71a665465e9d65f53b39ddf9
BLAKE2b-256 8ee9788526aec2e799b25e93b29b693d7e8a492befc9bccb3fac878ef1d58386

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page