{"id":20399933,"url":"https://github.com/kitware/trame-cookiecutter","last_synced_at":"2025-04-12T13:50:25.052Z","repository":{"id":41900366,"uuid":"443908228","full_name":"Kitware/trame-cookiecutter","owner":"Kitware","description":"Cookie Cutter template for creating trame application/module","archived":false,"fork":false,"pushed_at":"2025-03-09T23:25:41.000Z","size":352,"stargazers_count":17,"open_issues_count":1,"forks_count":11,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-26T08:23:01.743Z","etag":null,"topics":["cookiecutter","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kitware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2022-01-03T01:17:58.000Z","updated_at":"2025-03-09T23:25:44.000Z","dependencies_parsed_at":"2023-11-19T02:41:11.510Z","dependency_job_id":"42a92258-fade-4213-a938-2c820f24c69b","html_url":"https://github.com/Kitware/trame-cookiecutter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ftrame-cookiecutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ftrame-cookiecutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ftrame-cookiecutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ftrame-cookiecutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kitware","download_url":"https://codeload.github.com/Kitware/trame-cookiecutter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248575441,"owners_count":21127186,"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","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":["cookiecutter","trame","trame-maintenance-program"],"created_at":"2024-11-15T04:35:15.364Z","updated_at":"2025-04-12T13:50:25.033Z","avatar_url":"https://github.com/Kitware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cookiecutter Trame\n\nThis is a [Cookiecutter](https://github.com/audreyr/cookiecutter) template that generates\n[Trame](https://github.com/kitware/trame) boilerplate.\n\n## Quick Start\n\nInstall the Cookiecutter package:\n\n```bash\npip install cookiecutter\n```\n\n## Trame v1\n\n```bash\ncookiecutter gh:kitware/trame-cookiecutter -c v1\n```\n\n## Trame v2\n\n```bash\ncookiecutter gh:kitware/trame-cookiecutter\n```\n\n## What do you get?\n\nThis project contains a Cookiecutter template that helps you create new\nPython 3.6+ package for trame by automatically generating most of the boiler\nplate content for you.\n\nThe cookiecutter will ask you set of questions to refine what you aim to build\nusing trame, but the most important one which will affect the shape of what you\nwill get is the **project_type**.\n\nThe **project_type** can be only one of the following options:\n\n* **App**\n    This will provide the infrastructure for building a trame application that\n    can leverage all the existing set of trame components using only Python.\n    By default a simple vtk.js application is used as reference to provide\n    the trame basic while demonstrating an interactive application with code\n    separation between the Python core and the web frontend.\n    Whithin that Python package, a jupyter helper module will also be available\n    to run and show your application within a jupyter environment.\n    On top of that Python package, you will have access to several bundling\n    option ranging from a standalone executable to a docker image for cloud\n    deployment.\n* **App with Components**\n    This will provide the same infrastructure as above but with an additional\n    directory that will contain a vue.js project for defining new UI elements\n    that can then be used within your trame application. This path is more\n    advanced than the plain Application one as it will require some Web\n    development knowledge.\n    Also on top of that new web structure, a Python module is getting created\n    to bridge what has been defined on the JavaScript side so it can be used\n    at the Python level.\n* **Components**\n    This is the same thing as above but without the application part.\n    Basically it creates the Python package so it can be pip installable\n    and used by any trame application at the Python level.\n    But as before stated, this will require some Web development knowledge.\n\n\nThe structure produced by this Cookiecutter template contains the following items:\n\n```\n├── .*                         # (Continuous integration option) Python quality control + Github actions\n├── CONTRIBUTING.rst           # Minimal content for project contribution\n├── LICENSE                    # Selected license\n├── MANIFEST.in                # List external files/directories that needs to be part of the Python package\n├── README.rst                 # Minimal README using RST format so it get exposed to PyPI if deployed\n├── bundles                    # (App option) Bundling helper for Application\n│   ├── desktop                  # How to create a desktop executable\n│   │   ├── macOS/*                # On macOS\n│   │   └── windows/*              # On Windows\n│   └── docker/*                 # How to create docker image for cloud service deployment\n├── examples                   # (App option) Usage example of your application\n│   └── jupyter/*                # Notebook to use inside Jupyter\n├── setup.cfg                  # Configuration file for your Python package\n├── setup.py                   # Python package entry point\n├── tests/*                    # Testing infrastructure\n├── f\"{import_name}\"           # Root directory for your Python package\n│   ├── app                      # (App option) Root directory for your application\n│   │   ├── engine.py              # Core Python code for your application\n│   │   ├── jupyter.py             # Built-in adapter for usage in Jupyter\n│   │   ├── main.py                # Main executable setting-up your engine+ui\n│   │   └── ui.py                  # UI definition and bridge to Web frontend\n│   ├── module/*                 # (Component option) web files and configuration\n│   └── widgets/*                # (Component option) web to Python mapping\n├── trame/*                      # (Component only option) adapter to streamline import and usage for trame\n└── vue-components/*             # (Component option) Standard Vue.js project for creating a Vue plugin\n```\n\n### Configuration options\n\n* **project_name [Trame App]:** Human readable name for your application\n* **project_type [App]:** Project type described in more detail above\n* **author:** Used for your package definition (setup.cfg)\n* **short_description:** Used for your package definition (setup.cfg)\n* **license [BSD]:** Used for your package definition (setup.cfg + LICENSE)\n* **include_continuous_integration:** Create Github actions with Python quality control validation (.*)\n* **package_name:** Application name to use for `pip install` or application execution\n* **import_name:** Physical name of the root directory of your application/library\n\n### Usage example\n\n__Caution__: If you don't keep the same options, please look at the generated README to properly capture the specificity of your setup.\n\n```bash\n$ python3 -m venv .venv\n$ source ./.venv/bin/activate\n$ python -m pip install --upgrade pip\n$ pip install cookiecutter\n\n$ cookiecutter gh:kitware/trame-cookiecutter\n\n    project_name [Trame App]: Visualis\n    Select project_type:\n    1 - App\n    2 - App with Components\n    3 - Components\n    Choose from 1, 2, 3 [1]:\n    author [Trame Developer]: Kitware Inc.\n    short_description [An example Trame application]: VTK viewer for 3d stuff\n    Select license:\n    1 - BSD License\n    2 - MIT License\n    3 - ISC License (ISCL)\n    4 - Apache Software License\n    5 - GNU General Public License v3 (GPLv3)\n    6 - Other\n    Choose from 1, 2, 3, 4, 5, 6 [1]: 4\n    include_continuous_integration [y]: n\n    package_name [visualis]:\n    import_name [visualis]:\n\ncd visualis\npip install . # Install your new application\n\npip install pywebview  # For app usage\npip install jupyterlab # For Jupyter usage\n```\n\nThen you can run it using your browser with the following command line:\n\n```bash\nvisualis\n```\n\n![Standard execution with auto browser open](https://github.com/Kitware/trame-cookiecutter/blob/master/docs/browser.jpg?raw=true)\n\nOr show it as a desktop application with the following command line:\n\n```bash\nvisualis --app\n```\n\n![Desktop Application mode](https://github.com/Kitware/trame-cookiecutter/blob/master/docs/app.jpg?raw=true)\n\nOr with Jupyter\n\n```bash\njupyter-lab\n```\n\n![Jupyter Notebook Example](https://github.com/Kitware/trame-cookiecutter/blob/master/docs/jupyter.jpg?raw=true)\n\nAnd if you have docker\n\n```bash\ncd bundles/docker\n./scripts/build_image.sh\n./scripts/run_image.sh\n#\u003e open http://localhost:8080/\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitware%2Ftrame-cookiecutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitware%2Ftrame-cookiecutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitware%2Ftrame-cookiecutter/lists"}