Skip to main content

Vue Router widgets for trame

Project description

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.0.1.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

trame_router-2.0.1-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trame-router-2.0.1.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.4 keyring/23.5.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.13

File hashes

Hashes for trame-router-2.0.1.tar.gz
Algorithm Hash digest
SHA256 3b9fb37c0cdd0014a619d85c7e5480b42242fb4bc52006cb3e63d93447444256
MD5 8151232983c53dc255260d4b1024ffc6
BLAKE2b-256 0356a1875ac72eea534caa60da69341c03440417a60814923c2084f368c081b3

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: trame_router-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 30.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.4 keyring/23.5.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.13

File hashes

Hashes for trame_router-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b3a1cec9210a6001ea5a93caab2651a73cdfed8fba18e13ed19944a9c9ea8b5
MD5 62ed462700df30c33016eed2205fd91b
BLAKE2b-256 6f8d594313a05720154276c373ca1f24b414691798f962ec06fae77960d9c38a

See more details on using hashes here.

Provenance

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