{"id":20399936,"url":"https://github.com/kitware/trame-router","last_synced_at":"2025-07-27T18:14:46.623Z","repository":{"id":84741779,"uuid":"489154515","full_name":"Kitware/trame-router","owner":"Kitware","description":"trame-router brings Vue Router capabilities into trame widgets and ui","archived":false,"fork":false,"pushed_at":"2025-04-15T00:56:21.000Z","size":315,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-30T16:17:22.226Z","etag":null,"topics":["trame","trame-maintenance-program"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kitware.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-05T23:27:29.000Z","updated_at":"2025-04-15T00:56:26.000Z","dependencies_parsed_at":"2024-02-04T18:23:10.196Z","dependency_job_id":"09255783-950d-43e5-aba5-2a5c537cae6f","html_url":"https://github.com/Kitware/trame-router","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Kitware/trame-router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ftrame-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ftrame-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ftrame-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ftrame-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kitware","download_url":"https://codeload.github.com/Kitware/trame-router/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ftrame-router/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267400739,"owners_count":24081190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["trame","trame-maintenance-program"],"created_at":"2024-11-15T04:35:16.094Z","updated_at":"2025-07-27T18:14:46.616Z","avatar_url":"https://github.com/Kitware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. |pypi_download| image:: https://img.shields.io/pypi/dm/trame-router\n\ntrame-router enable multi-page navigation |pypi_download|\n===========================================================================\n\n.. image:: https://github.com/Kitware/trame-router/actions/workflows/test_and_release.yml/badge.svg\n    :target: https://github.com/Kitware/trame-router/actions/workflows/test_and_release.yml\n    :alt: Test and Release\n\nTrame-router extend trame **widgets** and **ui** with **Vue Router** components and helper to streamline its usage with trame.\nVue Router is the official router for Vue.js on which trame is based.\n\n\nInstalling\n-----------------------------------------------------------\n\ntrame-router can be installed with `pip \u003chttps://pypi.org/project/trame-router/\u003e`_:\n\n.. code-block:: bash\n\n    pip install --upgrade trame-router\n\n\nUsage\n-----------------------------------------------------------\n\nThe `Trame Tutorial \u003chttps://kitware.github.io/trame/guide/tutorial\u003e`_ is the place to go to learn how to use the library and start building your own application.\n\nThe `API Reference \u003chttps://trame.readthedocs.io/en/latest/index.html\u003e`_ documentation provides API-level documentation.\n\n`The original Vue Router documentation \u003chttps://router.vuejs.org/\u003e`_ provide a great introduction resource.\n\nThe router elements can be used as follow in trame:\n\n.. code-block:: python\n\n    # [...]\n    from trame.ui.router import RouterViewLayout\n    from trame.widgets import router\n\n    with RouterViewLayout(server, \"/\"):\n        with vuetify.VCard():\n            vuetify.VCardTitle(\"This is home\")\n\n    with RouterViewLayout(server, \"/foo\"):\n        with vuetify.VCard():\n            vuetify.VCardTitle(\"This is foo\")\n\n    with RouterViewLayout(server, \"/bar/:id\"):\n        with vuetify.VList():\n            vuetify.VListItem(\"Bar {{ $route.params.id }} item 1\")\n            vuetify.VListItem(\"Bar {{ $route.params.id }} item 2\")\n            vuetify.VListItem(\"Bar {{ $route.params.id }} item 3\")\n\n    with SinglePageWithDrawerLayout(server) as layout:\n        with layout.toolbar:\n            vuetify.VBtn(\"Home\", to=\"/\")\n            vuetify.VBtn(\"Foo\", to=\"/foo\")\n            vuetify.VBtn(\"Bar 1\", to=\"/bar/1\")\n            vuetify.VBtn(\"Bar 2\", to=\"/bar/2\")\n            vuetify.VBtn(\"Bar 3\", to=\"/bar/3\")\n\n        with layout.content:\n            router.RouterView()\n\nEnvironment variables\n-----------------------------------------------------------\n\nWith vue3 and docker, trame-router can leverage the html5 history mode but by default we use the \"hash\" mode.\nTo enable it, you need to define a **TRAME_ROUTER_HISTORY_MODE** environment variable that should either be set to \"html5\" or \"hash\".\nThis can only work if using our docker bundle or with a proper web server configuration when delivering the static HTML/JS/CSS content yourself.\n\n\nLicense\n-----------------------------------------------------------\n\ntrame-router is made available under the MIT License. For more details, see `LICENSE \u003chttps://github.com/Kitware/trame-router/blob/master/LICENSE\u003e`_\nThis license has been chosen to match the one use by `Vue Router \u003chttps://github.com/vuejs/router/blob/main/LICENSE\u003e`_ which is used under the cover.\n\n\nCommunity\n-----------------------------------------------------------\n\n`Trame \u003chttps://kitware.github.io/trame/\u003e`_ | `Discussions \u003chttps://github.com/Kitware/trame/discussions\u003e`_ | `Issues \u003chttps://github.com/Kitware/trame/issues\u003e`_ | `Contact Us \u003chttps://www.kitware.com/contact-us/\u003e`_\n\n.. image:: https://zenodo.org/badge/410108340.svg\n    :target: https://zenodo.org/badge/latestdoi/410108340\n\n\nEnjoying trame?\n-----------------------------------------------------------\n\nShare your experience `with a testimonial \u003chttps://github.com/Kitware/trame/issues/18\u003e`_ or `with a brand approval \u003chttps://github.com/Kitware/trame/issues/19\u003e`_.\n\n\nJavaScript dependency\n-----------------------------------------------------------\n\nThis 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@4.2.4``.\nIf you would like us to upgrade any of those dependencies, `please reach out \u003chttps://www.kitware.com/trame/\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitware%2Ftrame-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitware%2Ftrame-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitware%2Ftrame-router/lists"}