trame-router


Nametrame-router JSON
Version 2.3.0 PyPI version JSON
download
home_pageNone
SummaryVue Router widgets for trame
upload_time2024-08-05 18:27:48
maintainerNone
docs_urlNone
authorKitware Inc.
requires_pythonNone
licenseMIT
keywords python interactive web application framework
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            trame-router brings multi-page navigation to trame
===========================================================================

.. image:: https://github.com/Kitware/trame-router/actions/workflows/test_and_release.yml/badge.svg
    :target: https://github.com/Kitware/trame-router/actions/workflows/test_and_release.yml
    :alt: 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 <https://pypi.org/project/trame-router/>`_:

.. code-block:: bash

    pip install --upgrade trame-router


Usage
-----------------------------------------------------------

The `Trame Tutorial <https://kitware.github.io/trame/docs/tutorial.html>`_ is the place to go to learn how to use the library and start building your own application.

The `API Reference <https://trame.readthedocs.io/en/latest/index.html>`_ documentation provides API-level documentation.

`The original Vue Router documentation <https://router.vuejs.org/>`_ provide a great introduction resource.

The router elements can be used as follow in trame:

.. code-block:: python

    # [...]
    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 <https://github.com/Kitware/trame-router/blob/master/LICENSE>`_
This license has been chosen to match the one use by `Vue Router <https://github.com/vuejs/router/blob/main/LICENSE>`_ which is used under the cover.


Community
-----------------------------------------------------------

`Trame <https://kitware.github.io/trame/>`_ | `Discussions <https://github.com/Kitware/trame/discussions>`_ | `Issues <https://github.com/Kitware/trame/issues>`_ | `RoadMap <https://github.com/Kitware/trame/projects/1>`_ | `Contact Us <https://www.kitware.com/contact-us/>`_

.. image:: https://zenodo.org/badge/410108340.svg
    :target: https://zenodo.org/badge/latestdoi/410108340


Enjoying trame?
-----------------------------------------------------------

Share your experience `with a testimonial <https://github.com/Kitware/trame/issues/18>`_ or `with a brand approval <https://github.com/Kitware/trame/issues/19>`_.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "trame-router",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "Python, Interactive, Web, Application, Framework",
    "author": "Kitware Inc.",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/99/cc/57b6737fa47ca8d32b6a5bda1e9d1636ca1233abef9ad63a19d9bcea19ff/trame-router-2.3.0.tar.gz",
    "platform": null,
    "description": "trame-router brings multi-page navigation to trame\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 <https://pypi.org/project/trame-router/>`_:\n\n.. code-block:: bash\n\n    pip install --upgrade trame-router\n\n\nUsage\n-----------------------------------------------------------\n\nThe `Trame Tutorial <https://kitware.github.io/trame/docs/tutorial.html>`_ is the place to go to learn how to use the library and start building your own application.\n\nThe `API Reference <https://trame.readthedocs.io/en/latest/index.html>`_ documentation provides API-level documentation.\n\n`The original Vue Router documentation <https://router.vuejs.org/>`_ 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 <https://github.com/Kitware/trame-router/blob/master/LICENSE>`_\nThis license has been chosen to match the one use by `Vue Router <https://github.com/vuejs/router/blob/main/LICENSE>`_ which is used under the cover.\n\n\nCommunity\n-----------------------------------------------------------\n\n`Trame <https://kitware.github.io/trame/>`_ | `Discussions <https://github.com/Kitware/trame/discussions>`_ | `Issues <https://github.com/Kitware/trame/issues>`_ | `RoadMap <https://github.com/Kitware/trame/projects/1>`_ | `Contact Us <https://www.kitware.com/contact-us/>`_\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 <https://github.com/Kitware/trame/issues/18>`_ or `with a brand approval <https://github.com/Kitware/trame/issues/19>`_.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Vue Router widgets for trame",
    "version": "2.3.0",
    "project_urls": null,
    "split_keywords": [
        "python",
        " interactive",
        " web",
        " application",
        " framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ad24e3d835b47a0eeb11e21b1edc71407bc9d8d6a59a9d3076117ba3523bce8",
                "md5": "84afc17e796618605307c60400b7320d",
                "sha256": "b1d2b94ead3d6d9a731e544a7fbb343788b71e1c4139f2a5e17f19c5f4fa344d"
            },
            "downloads": -1,
            "filename": "trame_router-2.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "84afc17e796618605307c60400b7320d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 47277,
            "upload_time": "2024-08-05T18:27:47",
            "upload_time_iso_8601": "2024-08-05T18:27:47.188418Z",
            "url": "https://files.pythonhosted.org/packages/4a/d2/4e3d835b47a0eeb11e21b1edc71407bc9d8d6a59a9d3076117ba3523bce8/trame_router-2.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "99cc57b6737fa47ca8d32b6a5bda1e9d1636ca1233abef9ad63a19d9bcea19ff",
                "md5": "78860180b6b0909c4e63c2aae8bf2873",
                "sha256": "b382bdaad59998d5fcb93613a6e6828d68ff168eff87df56b13604a331294216"
            },
            "downloads": -1,
            "filename": "trame-router-2.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "78860180b6b0909c4e63c2aae8bf2873",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 45929,
            "upload_time": "2024-08-05T18:27:48",
            "upload_time_iso_8601": "2024-08-05T18:27:48.839155Z",
            "url": "https://files.pythonhosted.org/packages/99/cc/57b6737fa47ca8d32b6a5bda1e9d1636ca1233abef9ad63a19d9bcea19ff/trame-router-2.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-05 18:27:48",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "trame-router"
}
        
Elapsed time: 0.94980s