trame-router


Nametrame-router JSON
Version 2.2.0 PyPI version JSON
download
home_pageNone
SummaryVue Router widgets for trame
upload_time2024-03-24 20:53:47
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()


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/df/89/35c026e07f0950f6d21c539e6979725b50803907a85c2ccde0ba463c5e59/trame-router-2.2.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\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.2.0",
    "project_urls": null,
    "split_keywords": [
        "python",
        " interactive",
        " web",
        " application",
        " framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ee9788526aec2e799b25e93b29b693d7e8a492befc9bccb3fac878ef1d58386",
                "md5": "5085189a71a665465e9d65f53b39ddf9",
                "sha256": "b66c5854c41bd421f39e28fe28bc33b536cb5839ff7d842030e54d3c7d7b5b3a"
            },
            "downloads": -1,
            "filename": "trame_router-2.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5085189a71a665465e9d65f53b39ddf9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 46920,
            "upload_time": "2024-03-24T20:53:46",
            "upload_time_iso_8601": "2024-03-24T20:53:46.072090Z",
            "url": "https://files.pythonhosted.org/packages/8e/e9/788526aec2e799b25e93b29b693d7e8a492befc9bccb3fac878ef1d58386/trame_router-2.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df8935c026e07f0950f6d21c539e6979725b50803907a85c2ccde0ba463c5e59",
                "md5": "a0d520858c043b8a72b22c4f64086249",
                "sha256": "7958924c414497722eb3cbad32f0f92638ea262cff97a3bcab985a87146bfb1a"
            },
            "downloads": -1,
            "filename": "trame-router-2.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a0d520858c043b8a72b22c4f64086249",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 45403,
            "upload_time": "2024-03-24T20:53:47",
            "upload_time_iso_8601": "2024-03-24T20:53:47.272633Z",
            "url": "https://files.pythonhosted.org/packages/df/89/35c026e07f0950f6d21c539e6979725b50803907a85c2ccde0ba463c5e59/trame-router-2.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-24 20:53:47",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "trame-router"
}
        
Elapsed time: 0.20306s