trame-flow 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,26 @@
1
+ .DS_Store
2
+ node_modules
3
+ .venv
4
+
5
+ # local env files
6
+ .env.local
7
+ .env.*.local
8
+
9
+ # Log files
10
+ npm-debug.log*
11
+ yarn-debug.log*
12
+ yarn-error.log*
13
+ pnpm-debug.log*
14
+
15
+ # Editor directories and files
16
+ .idea
17
+ .vscode
18
+ *.suo
19
+ *.ntvs*
20
+ *.njsproj
21
+ *.sln
22
+ *.sw?
23
+
24
+ __pycache__
25
+ *egg-info
26
+ *pyc
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025, Kitware Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,107 @@
1
+ Metadata-Version: 2.4
2
+ Name: trame-flow
3
+ Version: 1.0.0
4
+ Summary: A node editor for trame using VueFlow
5
+ Author: Trame Developer
6
+ License: MIT License
7
+ License-File: LICENSE
8
+ Keywords: Application,Framework,Interactive,Python,Web
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Web Environment
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Natural Language :: English
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Requires-Python: >=3.9
18
+ Requires-Dist: trame-client>=3.10
19
+ Requires-Dist: typing-extensions>=4.10.0
20
+ Provides-Extra: app
21
+ Requires-Dist: pywebview; extra == 'app'
22
+ Provides-Extra: dev
23
+ Requires-Dist: nox; extra == 'dev'
24
+ Requires-Dist: pre-commit; extra == 'dev'
25
+ Requires-Dist: pytest-cov>=3; extra == 'dev'
26
+ Requires-Dist: pytest>=6; extra == 'dev'
27
+ Requires-Dist: ruff; extra == 'dev'
28
+ Provides-Extra: examples
29
+ Requires-Dist: trame-vuetify>=3.1.0; extra == 'examples'
30
+ Requires-Dist: trame>=3.12.0; extra == 'examples'
31
+ Provides-Extra: jupyter
32
+ Requires-Dist: jupyterlab; extra == 'jupyter'
33
+ Description-Content-Type: text/x-rst
34
+
35
+ Trame Flow
36
+ ----------------------------------------
37
+
38
+ A node editor for `trame <https://kitware.github.io/trame/>`_ based on `VueFlow <https://vueflow.dev/>`_.
39
+
40
+ License
41
+ ----------------------------------------
42
+
43
+ This library is OpenSource and follow the MIT License.
44
+
45
+ Installation
46
+ ----------------------------------------
47
+
48
+ Install the application/library.
49
+
50
+ .. code-block:: console
51
+
52
+ pip install trame-flow
53
+
54
+ Usage
55
+ -----
56
+
57
+ Examples can be found in the examples directory. To run them you need trame and trame-vuetify.
58
+
59
+ Development setup
60
+ ----------------------------------------
61
+
62
+ We recommend using uv for setting up and managing a virtual environment for your development.
63
+
64
+ .. code-block:: console
65
+
66
+ # Create venv and install all dependencies
67
+ uv sync --all-extras --dev
68
+
69
+ # Activate environment
70
+ source .venv/bin/activate
71
+
72
+ # Install commit analysis
73
+ pre-commit install
74
+ pre-commit install --hook-type commit-msg
75
+
76
+ # Allow live code edit
77
+ uv pip install -e .
78
+
79
+
80
+ Build and install the Vue components.
81
+
82
+ .. code-block:: console
83
+
84
+ cd vue-components
85
+ npm i
86
+ npm run build
87
+ cd -
88
+
89
+ For running tests and checks, you can run ``nox``.
90
+
91
+ .. code-block:: console
92
+
93
+ # run all
94
+ nox
95
+
96
+ # lint
97
+ nox -s lint
98
+
99
+ # tests
100
+ nox -s tests
101
+
102
+ Professional Support
103
+ ----------------------------------------
104
+
105
+ * `Training <https://www.kitware.com/courses/trame/>`_: Learn how to confidently use trame from the expert developers at Kitware.
106
+ * `Support <https://www.kitware.com/trame/support/>`_: Our experts can assist your team as you build your web application and establish in-house expertise.
107
+ * `Custom Development <https://www.kitware.com/trame/support/>`_: Leverage Kitware’s 25+ years of experience to quickly build your web application.
@@ -0,0 +1,73 @@
1
+ Trame Flow
2
+ ----------------------------------------
3
+
4
+ A node editor for `trame <https://kitware.github.io/trame/>`_ based on `VueFlow <https://vueflow.dev/>`_.
5
+
6
+ License
7
+ ----------------------------------------
8
+
9
+ This library is OpenSource and follow the MIT License.
10
+
11
+ Installation
12
+ ----------------------------------------
13
+
14
+ Install the application/library.
15
+
16
+ .. code-block:: console
17
+
18
+ pip install trame-flow
19
+
20
+ Usage
21
+ -----
22
+
23
+ Examples can be found in the examples directory. To run them you need trame and trame-vuetify.
24
+
25
+ Development setup
26
+ ----------------------------------------
27
+
28
+ We recommend using uv for setting up and managing a virtual environment for your development.
29
+
30
+ .. code-block:: console
31
+
32
+ # Create venv and install all dependencies
33
+ uv sync --all-extras --dev
34
+
35
+ # Activate environment
36
+ source .venv/bin/activate
37
+
38
+ # Install commit analysis
39
+ pre-commit install
40
+ pre-commit install --hook-type commit-msg
41
+
42
+ # Allow live code edit
43
+ uv pip install -e .
44
+
45
+
46
+ Build and install the Vue components.
47
+
48
+ .. code-block:: console
49
+
50
+ cd vue-components
51
+ npm i
52
+ npm run build
53
+ cd -
54
+
55
+ For running tests and checks, you can run ``nox``.
56
+
57
+ .. code-block:: console
58
+
59
+ # run all
60
+ nox
61
+
62
+ # lint
63
+ nox -s lint
64
+
65
+ # tests
66
+ nox -s tests
67
+
68
+ Professional Support
69
+ ----------------------------------------
70
+
71
+ * `Training <https://www.kitware.com/courses/trame/>`_: Learn how to confidently use trame from the expert developers at Kitware.
72
+ * `Support <https://www.kitware.com/trame/support/>`_: Our experts can assist your team as you build your web application and establish in-house expertise.
73
+ * `Custom Development <https://www.kitware.com/trame/support/>`_: Leverage Kitware’s 25+ years of experience to quickly build your web application.
@@ -0,0 +1,115 @@
1
+ [project]
2
+ name = "trame-flow"
3
+ version = "1.0.0"
4
+ description = "A node editor for trame using VueFlow"
5
+ authors = [
6
+ {name = "Trame Developer"},
7
+ ]
8
+ dependencies = [
9
+ "trame_client>=3.10",
10
+ "typing-extensions>=4.10.0",
11
+ ]
12
+ requires-python = ">=3.9"
13
+ readme = "README.rst"
14
+ license = {text = "MIT License"}
15
+ keywords = ["Python", "Interactive", "Web", "Application", "Framework"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Web Environment",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Natural Language :: English",
21
+ "Operating System :: OS Independent",
22
+ "Programming Language :: Python :: 3 :: Only",
23
+ "Topic :: Software Development :: Libraries :: Application Frameworks",
24
+ "Topic :: Software Development :: Libraries :: Python Modules",
25
+ ]
26
+
27
+ [project.optional-dependencies]
28
+ app = [
29
+ "pywebview",
30
+ ]
31
+ jupyter = [
32
+ "jupyterlab",
33
+ ]
34
+ dev = [
35
+ "pre-commit",
36
+ "ruff",
37
+ "pytest >=6",
38
+ "pytest-cov >=3",
39
+ "nox",
40
+ ]
41
+ examples = [
42
+ "trame>=3.12.0",
43
+ "trame-vuetify>=3.1.0",
44
+ ]
45
+
46
+ [build-system]
47
+ requires = ["hatchling"]
48
+ build-backend = "hatchling.build"
49
+
50
+
51
+ [tool.hatch.build]
52
+ include = [
53
+ "/src/trame/**/*.py",
54
+ "/src/trame_flow/**/*.py",
55
+ "/src/trame_flow/**/*.js",
56
+ "/src/trame_flow/**/*.css",
57
+ ]
58
+
59
+ [tool.hatch.build.targets.wheel]
60
+ packages = [
61
+ "src/trame",
62
+ "src/trame_flow",
63
+ ]
64
+
65
+ [tool.ruff]
66
+
67
+ [tool.ruff.lint]
68
+ extend-select = [
69
+ "ARG", # flake8-unused-arguments
70
+ "B", # flake8-bugbear
71
+ "C4", # flake8-comprehensions
72
+ "EM", # flake8-errmsg
73
+ "EXE", # flake8-executable
74
+ "G", # flake8-logging-format
75
+ "I", # isort
76
+ "ICN", # flake8-import-conventions
77
+ "NPY", # NumPy specific rules
78
+ "PD", # pandas-vet
79
+ "PGH", # pygrep-hooks
80
+ "PIE", # flake8-pie
81
+ "PL", # pylint
82
+ "PT", # flake8-pytest-style
83
+ "PTH", # flake8-use-pathlib
84
+ "RET", # flake8-return
85
+ "RUF", # Ruff-specific
86
+ "SIM", # flake8-simplify
87
+ "T20", # flake8-print
88
+ "UP", # pyupgrade
89
+ "YTT", # flake8-2020
90
+ ]
91
+ ignore = [
92
+ "PLR09", # Too many <...>
93
+ "PLR2004", # Magic value used in comparison
94
+ "ISC001", # Conflicts with formatter
95
+ "PLC0415", # lazy import
96
+ ]
97
+ isort.required-imports = []
98
+
99
+ [tool.ruff.lint.per-file-ignores]
100
+ "tests/**" = ["T20", "PLC0415"]
101
+ "noxfile.py" = ["T20"]
102
+ "src/**" = ["SIM117"]
103
+ [tool.semantic_release]
104
+ version_toml = [
105
+ "pyproject.toml:project.version",
106
+ ]
107
+ version_variables = [
108
+ "src/trame_flow/__init__.py:__version__",
109
+ ]
110
+
111
+ build_command = "pip install uv && uv build"
112
+
113
+ [tool.semantic_release.publish]
114
+ dist_glob_patterns = ["dist/*"]
115
+ upload_to_vcs_release = true
@@ -0,0 +1 @@
1
+ from trame_flow.module import * # noqa: F403
@@ -0,0 +1,7 @@
1
+ from trame_flow.widgets.flow import * # noqa: F403
2
+
3
+
4
+ def initialize(server):
5
+ from trame_flow import module
6
+
7
+ server.enable_module(module)
@@ -0,0 +1 @@
1
+ __version__ = "1.0.0"
@@ -0,0 +1,25 @@
1
+ from pathlib import Path
2
+
3
+ # Compute local path to serve
4
+ serve_path = str(Path(__file__).with_name("serve").resolve())
5
+
6
+ # Serve directory for JS/CSS files
7
+ serve = {"__trame_flow": serve_path}
8
+
9
+ # List of JS files to load (usually from the serve path above)
10
+ scripts = ["__trame_flow/trame_flow.umd.js"]
11
+
12
+ # List of CSS files to load (usually from the serve path above)
13
+ if (Path(serve_path) / "style.css").exists():
14
+ styles = ["__trame_flow/style.css"]
15
+
16
+ # List of Vue plugins to install/load
17
+ vue_use = ["trame_flow"]
18
+
19
+ # Uncomment to add entries to the shared state
20
+ # state = {}
21
+
22
+
23
+ # Optional if you want to execute custom initialization at module load
24
+ def setup(app, **kwargs):
25
+ """Method called at initialization with possibly some custom keyword arguments"""
@@ -0,0 +1 @@
1
+ .vue-flow{position:relative;width:100%;height:100%;overflow:hidden;z-index:0;direction:ltr}.vue-flow__container{position:absolute;height:100%;width:100%;left:0;top:0}.vue-flow__pane{z-index:1}.vue-flow__pane.draggable{cursor:grab}.vue-flow__pane.selection{cursor:pointer}.vue-flow__pane.dragging{cursor:grabbing}.vue-flow__transformationpane{transform-origin:0 0;z-index:2;pointer-events:none}.vue-flow__viewport{z-index:4;overflow:clip}.vue-flow__selection{z-index:6}.vue-flow__edge-labels{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible{outline:none}.vue-flow .vue-flow__edges{pointer-events:none;overflow:visible}.vue-flow__edge-path,.vue-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.vue-flow__edge{pointer-events:visibleStroke;cursor:pointer}.vue-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__edge.animated path.vue-flow__edge-interaction{stroke-dasharray:none;animation:none}.vue-flow__edge.inactive{pointer-events:none}.vue-flow__edge.selected,.vue-flow__edge:focus,.vue-flow__edge:focus-visible{outline:none}.vue-flow__edge.selected .vue-flow__edge-path,.vue-flow__edge:focus .vue-flow__edge-path,.vue-flow__edge:focus-visible .vue-flow__edge-path{stroke:#555}.vue-flow__edge-textwrapper{pointer-events:all}.vue-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__connection{pointer-events:none}.vue-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__connectionline{z-index:1001}.vue-flow__nodes{pointer-events:none;transform-origin:0 0}.vue-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.vue-flow__node.draggable{cursor:grab;pointer-events:all}.vue-flow__node.draggable.dragging{cursor:grabbing}.vue-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.vue-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.vue-flow__nodesselection-rect.dragging{cursor:grabbing}.vue-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px}.vue-flow__handle.connectable{pointer-events:all;cursor:crosshair}.vue-flow__handle-bottom{left:50%;bottom:0;transform:translate(-50%,50%)}.vue-flow__handle-top{left:50%;top:0;transform:translate(-50%,-50%)}.vue-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.vue-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.vue-flow__edgeupdater{cursor:move;pointer-events:all}.vue-flow__panel{position:absolute;z-index:5;margin:15px}.vue-flow__panel.top{top:0}.vue-flow__panel.bottom{bottom:0}.vue-flow__panel.left{left:0}.vue-flow__panel.right{right:0}.vue-flow__panel.center{left:50%;transform:translate(-50%)}@keyframes dashdraw{0%{stroke-dashoffset:10}}:root{--vf-node-bg: #fff;--vf-node-text: #222;--vf-connection-path: #b1b1b7;--vf-handle: #555}.vue-flow__edge.updating .vue-flow__edge-path{stroke:#777}.vue-flow__edge-text{font-size:10px}.vue-flow__edge-textbg{fill:#fff}.vue-flow__connection-path{stroke:var(--vf-connection-path)}.vue-flow__node{cursor:grab}.vue-flow__node.selectable:focus,.vue-flow__node.selectable:focus-visible{outline:none}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{padding:10px;border-radius:3px;width:150px;font-size:12px;text-align:center;border-width:1px;border-style:solid;color:var(--vf-node-text);background-color:var(--vf-node-bg);border-color:var(--vf-node-color)}.vue-flow__node-default.selected,.vue-flow__node-default.selected:hover,.vue-flow__node-input.selected,.vue-flow__node-input.selected:hover,.vue-flow__node-output.selected,.vue-flow__node-output.selected:hover{box-shadow:0 0 0 .5px var(--vf-box-shadow)}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible,.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible,.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid #555}.vue-flow__node-default .vue-flow__handle,.vue-flow__node-input .vue-flow__handle,.vue-flow__node-output .vue-flow__handle{background:var(--vf-handle)}.vue-flow__node-default.selectable:hover,.vue-flow__node-input.selectable:hover,.vue-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.vue-flow__node-input{--vf-node-color: var(--vf-node-color, #0041d0);--vf-handle: var(--vf-node-color, #0041d0);--vf-box-shadow: var(--vf-node-color, #0041d0);background:var(--vf-node-bg);border-color:var(--vf-node-color, #0041d0)}.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible{outline:none;border:1px solid var(--vf-node-color, #0041d0)}.vue-flow__node-default{--vf-handle: var(--vf-node-color, #1a192b);--vf-box-shadow: var(--vf-node-color, #1a192b);background:var(--vf-node-bg);border-color:var(--vf-node-color, #1a192b)}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible{outline:none;border:1px solid var(--vf-node-color, #1a192b)}.vue-flow__node-output{--vf-handle: var(--vf-node-color, #ff0072);--vf-box-shadow: var(--vf-node-color, #ff0072);background:var(--vf-node-bg);border-color:var(--vf-node-color, #ff0072)}.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid var(--vf-node-color, #ff0072)}.vue-flow__nodesselection-rect,.vue-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible,.vue-flow__selection:focus,.vue-flow__selection:focus-visible{outline:none}.vue-flow__handle{width:6px;height:6px;background:var(--vf-handle);border:1px solid #fff;border-radius:100%}.vue-flow__minimap{background-color:#fff}.vue-flow__minimap.pannable{cursor:grab}.vue-flow__minimap.dragging{cursor:grabbing}.vue-flow__minimap-mask.pannable{cursor:grab}.vue-flow__controls{box-shadow:0 0 2px 1px #00000014}.vue-flow__controls-button{background:#fefefe;border:none;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;user-select:none;padding:5px}.vue-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.vue-flow__controls-button:hover{background:#f4f4f4}.vue-flow__controls-button:disabled{pointer-events:none}.vue-flow__controls-button:disabled svg{fill-opacity:.4}