dvm-eahelper 0.1.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.
Files changed (32) hide show
  1. dvm_eahelper-0.1.0/.env.example +3 -0
  2. dvm_eahelper-0.1.0/.github/workflows/publish.yml +48 -0
  3. dvm_eahelper-0.1.0/.gitignore +55 -0
  4. dvm_eahelper-0.1.0/LICENSE +21 -0
  5. dvm_eahelper-0.1.0/PKG-INFO +128 -0
  6. dvm_eahelper-0.1.0/README.md +93 -0
  7. dvm_eahelper-0.1.0/pyproject.toml +69 -0
  8. dvm_eahelper-0.1.0/src/dvm_eahelper/__init__.py +4 -0
  9. dvm_eahelper-0.1.0/src/dvm_eahelper/__main__.py +4 -0
  10. dvm_eahelper-0.1.0/src/dvm_eahelper/_version.py +24 -0
  11. dvm_eahelper-0.1.0/src/dvm_eahelper/cli.py +500 -0
  12. dvm_eahelper-0.1.0/src/dvm_eahelper/graph/__init__.py +0 -0
  13. dvm_eahelper-0.1.0/src/dvm_eahelper/graph/base.py +81 -0
  14. dvm_eahelper-0.1.0/src/dvm_eahelper/graph/cli.py +193 -0
  15. dvm_eahelper-0.1.0/src/dvm_eahelper/graph/discover.py +247 -0
  16. dvm_eahelper-0.1.0/src/dvm_eahelper/graph/fetch.py +147 -0
  17. dvm_eahelper-0.1.0/src/dvm_eahelper/graph/kuzu_backend.py +263 -0
  18. dvm_eahelper-0.1.0/src/dvm_eahelper/graph/loader.py +293 -0
  19. dvm_eahelper-0.1.0/src/dvm_eahelper/graph/neo4j_backend.py +150 -0
  20. dvm_eahelper-0.1.0/src/dvm_eahelper/graph/seed.py +128 -0
  21. dvm_eahelper-0.1.0/src/dvm_eahelper/graph/select.py +51 -0
  22. dvm_eahelper-0.1.0/src/dvm_eahelper/leanix/__init__.py +0 -0
  23. dvm_eahelper-0.1.0/src/dvm_eahelper/leanix/_library_help.py +256 -0
  24. dvm_eahelper-0.1.0/src/dvm_eahelper/leanix/download.py +949 -0
  25. dvm_eahelper-0.1.0/src/dvm_eahelper/metamodel-mapping.yaml +197 -0
  26. dvm_eahelper-0.1.0/src/dvm_eahelper/proxy/__init__.py +0 -0
  27. dvm_eahelper-0.1.0/src/dvm_eahelper/proxy/diagnose.py +320 -0
  28. dvm_eahelper-0.1.0/src/dvm_eahelper/proxy/graphiql.py +58 -0
  29. dvm_eahelper-0.1.0/src/dvm_eahelper/proxy/persistence.py +59 -0
  30. dvm_eahelper-0.1.0/src/dvm_eahelper/proxy/server.py +317 -0
  31. dvm_eahelper-0.1.0/src/dvm_eahelper/proxy/token.py +240 -0
  32. dvm_eahelper-0.1.0/uv.lock +865 -0
@@ -0,0 +1,3 @@
1
+ NEO4J_URI=bolt://localhost:7687
2
+ NEO4J_USERNAME=neo4j
3
+ NEO4J_PASSWORD=your-password-here
@@ -0,0 +1,48 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ build:
10
+ name: Build distribution
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0
17
+
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v4
20
+
21
+ - name: Build package
22
+ run: uv build
23
+
24
+ - name: Upload build artifacts
25
+ uses: actions/upload-artifact@v4
26
+ with:
27
+ name: dist
28
+ path: dist/
29
+
30
+ publish:
31
+ name: Publish to PyPI
32
+ needs: build
33
+ runs-on: ubuntu-latest
34
+ environment:
35
+ name: pypi
36
+ url: https://pypi.org/p/dvm-eahelper
37
+ permissions:
38
+ id-token: write # required for Trusted Publishing (OIDC — no token needed)
39
+
40
+ steps:
41
+ - name: Download build artifacts
42
+ uses: actions/download-artifact@v4
43
+ with:
44
+ name: dist
45
+ path: dist/
46
+
47
+ - name: Publish to PyPI
48
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,55 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info/
8
+
9
+ # Virtual environments
10
+ .venv/
11
+ venv/
12
+ env/
13
+
14
+ # uv
15
+ .uv/
16
+
17
+ # Distribution / packaging
18
+ *.egg
19
+ MANIFEST
20
+ .installed.cfg
21
+ lib/
22
+ lib64/
23
+
24
+ # Testing & coverage
25
+ .pytest_cache/
26
+ .coverage
27
+ .coverage.*
28
+ coverage.xml
29
+ htmlcov/
30
+
31
+ # Type checkers
32
+ .mypy_cache/
33
+ .pytype/
34
+ .ruff_cache/
35
+
36
+ # IDE & editors
37
+ .vscode/
38
+ .idea/
39
+ *.swp
40
+ *.swo
41
+ *~
42
+
43
+ # OS
44
+ .DS_Store
45
+ Thumbs.db
46
+
47
+ # Project-specific
48
+ ~/.lean-ix/
49
+ leanix-graphql.pdf
50
+ # eahelper
51
+ _version.py
52
+ eahelper-kuzu-db/
53
+ data/leanix/
54
+ .env
55
+ *.kuzu
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 divyavanmahajan
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,128 @@
1
+ Metadata-Version: 2.4
2
+ Name: dvm-eahelper
3
+ Version: 0.1.0
4
+ Summary: LeanIX enterprise-architecture helper: GraphQL proxy, factsheet download, and graph loading into KuzuDB or Neo4j
5
+ Project-URL: Homepage, https://github.com/divyavanmahajan/dvm-eahelper
6
+ Project-URL: Source, https://github.com/divyavanmahajan/dvm-eahelper
7
+ Project-URL: Bug Tracker, https://github.com/divyavanmahajan/dvm-eahelper/issues
8
+ Author-email: Divya Van Mahajan <divyavanmahajan@users.noreply.github.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: enterprise-architecture,graphql,kuzu,leanix,neo4j
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: Microsoft :: Windows
18
+ Classifier: Operating System :: POSIX
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: Internet :: WWW/HTTP
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Requires-Python: >=3.11
26
+ Requires-Dist: fastapi>=0.115
27
+ Requires-Dist: httpx>=0.27
28
+ Requires-Dist: kuzu>=0.7
29
+ Requires-Dist: neo4j>=5.0
30
+ Requires-Dist: playwright>=1.49
31
+ Requires-Dist: python-dotenv>=1.0
32
+ Requires-Dist: pyyaml>=6.0
33
+ Requires-Dist: uvicorn[standard]>=0.32
34
+ Description-Content-Type: text/markdown
35
+
36
+ # dvm-eahelper — LeanIX Enterprise Architecture Helper
37
+
38
+ Successor to [`dvm-leanix`](https://github.com/divyavanmahajan/dvm-leanix) and
39
+ [`dvm-eagraph`](https://github.com/divyavanmahajan/dvm-eagraph), combined into a single package.
40
+
41
+ One CLI (`eahelper`) to:
42
+
43
+ - Run a local **GraphQL proxy** to SAP LeanIX — extracts the Bearer token from your
44
+ already-logged-in browser via Playwright CDP, serves GraphiQL for exploration
45
+ - **Download** factsheets and relationships as JSON
46
+ - **Load** them into a graph database — **KuzuDB** (embedded, default) or **Neo4j**
47
+
48
+ Works on **Windows** and **macOS**.
49
+
50
+ ## Installation
51
+
52
+ ```bash
53
+ uv tool install dvm-eahelper # or: pip install dvm-eahelper
54
+ uvx playwright install chromium # one-time, for the proxy
55
+ ```
56
+
57
+ ## Quick start
58
+
59
+ ### 1. Launch a debug browser and log into LeanIX
60
+
61
+ **Windows (PowerShell, Edge):**
62
+
63
+ ```powershell
64
+ Start-Process "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" `
65
+ "--remote-debugging-port=9222 --user-data-dir=C:\Temp\edge-debug --no-first-run --no-default-browser-check"
66
+ ```
67
+
68
+ **macOS (Chrome):**
69
+
70
+ ```bash
71
+ open -na "Google Chrome" --args --remote-debugging-port=9222 --user-data-dir="$HOME/chrome-debug"
72
+ ```
73
+
74
+ Log into your LeanIX workspace in that browser window.
75
+
76
+ ### 2. Run the proxy (separate terminal, keep it running)
77
+
78
+ ```bash
79
+ eahelper proxy
80
+ ```
81
+
82
+ ### 3. Download and load
83
+
84
+ ```bash
85
+ eahelper download --relations
86
+ eahelper load # prompts for DB backend; KuzuDB is the default
87
+ eahelper load --db neo4j # or choose explicitly
88
+ ```
89
+
90
+ KuzuDB is embedded — no server needed; the database is a local directory
91
+ (`--db-path`, default `./eahelper-kuzu-db`). For Neo4j, start your server and put
92
+ `NEO4J_URI`, `NEO4J_USERNAME`, `NEO4J_PASSWORD` in a `.env` file.
93
+
94
+ ## Commands
95
+
96
+ | Command | Purpose |
97
+ |---|---|
98
+ | `eahelper proxy` | Local GraphQL proxy + GraphiQL UI |
99
+ | `eahelper diagnose` | Check browser/CDP/SSL connectivity |
100
+ | `eahelper download` | Download factsheets & relationships to JSON |
101
+ | `eahelper load` | Load downloaded JSON into KuzuDB or Neo4j |
102
+ | `eahelper seed` | Seed example/reference data |
103
+
104
+ Backend selection precedence: `--db` flag → `EAHELPER_DB` env var → interactive
105
+ prompt (default **kuzu**).
106
+
107
+ ## Agent skill
108
+
109
+ An installable Agent Skill (Claude Code, GitHub Copilot, and other
110
+ [agentskills.io](https://agentskills.io)-compatible tools) that walks you through
111
+ setup and usage lives at
112
+ [dvm-eahelper-skills](https://github.com/divyavanmahajan/dvm-eahelper-skills).
113
+
114
+ ## Migrating from dvm-leanix / dvm-eagraph
115
+
116
+ | Old | New |
117
+ |---|---|
118
+ | `dvm-leanix serve` / `lean-ix serve` | `eahelper proxy` |
119
+ | `dvm-leanix download` | `eahelper download` |
120
+ | `dvm-leanix diagnose` | `eahelper diagnose` |
121
+ | `dvm-eagraph` | `eahelper load` |
122
+ | `dvm-eagraph-seed` | `eahelper seed` |
123
+
124
+ Token store moved from `~/.lean-ix/` to `~/.eahelper/`.
125
+
126
+ ## License
127
+
128
+ MIT
@@ -0,0 +1,93 @@
1
+ # dvm-eahelper — LeanIX Enterprise Architecture Helper
2
+
3
+ Successor to [`dvm-leanix`](https://github.com/divyavanmahajan/dvm-leanix) and
4
+ [`dvm-eagraph`](https://github.com/divyavanmahajan/dvm-eagraph), combined into a single package.
5
+
6
+ One CLI (`eahelper`) to:
7
+
8
+ - Run a local **GraphQL proxy** to SAP LeanIX — extracts the Bearer token from your
9
+ already-logged-in browser via Playwright CDP, serves GraphiQL for exploration
10
+ - **Download** factsheets and relationships as JSON
11
+ - **Load** them into a graph database — **KuzuDB** (embedded, default) or **Neo4j**
12
+
13
+ Works on **Windows** and **macOS**.
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ uv tool install dvm-eahelper # or: pip install dvm-eahelper
19
+ uvx playwright install chromium # one-time, for the proxy
20
+ ```
21
+
22
+ ## Quick start
23
+
24
+ ### 1. Launch a debug browser and log into LeanIX
25
+
26
+ **Windows (PowerShell, Edge):**
27
+
28
+ ```powershell
29
+ Start-Process "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" `
30
+ "--remote-debugging-port=9222 --user-data-dir=C:\Temp\edge-debug --no-first-run --no-default-browser-check"
31
+ ```
32
+
33
+ **macOS (Chrome):**
34
+
35
+ ```bash
36
+ open -na "Google Chrome" --args --remote-debugging-port=9222 --user-data-dir="$HOME/chrome-debug"
37
+ ```
38
+
39
+ Log into your LeanIX workspace in that browser window.
40
+
41
+ ### 2. Run the proxy (separate terminal, keep it running)
42
+
43
+ ```bash
44
+ eahelper proxy
45
+ ```
46
+
47
+ ### 3. Download and load
48
+
49
+ ```bash
50
+ eahelper download --relations
51
+ eahelper load # prompts for DB backend; KuzuDB is the default
52
+ eahelper load --db neo4j # or choose explicitly
53
+ ```
54
+
55
+ KuzuDB is embedded — no server needed; the database is a local directory
56
+ (`--db-path`, default `./eahelper-kuzu-db`). For Neo4j, start your server and put
57
+ `NEO4J_URI`, `NEO4J_USERNAME`, `NEO4J_PASSWORD` in a `.env` file.
58
+
59
+ ## Commands
60
+
61
+ | Command | Purpose |
62
+ |---|---|
63
+ | `eahelper proxy` | Local GraphQL proxy + GraphiQL UI |
64
+ | `eahelper diagnose` | Check browser/CDP/SSL connectivity |
65
+ | `eahelper download` | Download factsheets & relationships to JSON |
66
+ | `eahelper load` | Load downloaded JSON into KuzuDB or Neo4j |
67
+ | `eahelper seed` | Seed example/reference data |
68
+
69
+ Backend selection precedence: `--db` flag → `EAHELPER_DB` env var → interactive
70
+ prompt (default **kuzu**).
71
+
72
+ ## Agent skill
73
+
74
+ An installable Agent Skill (Claude Code, GitHub Copilot, and other
75
+ [agentskills.io](https://agentskills.io)-compatible tools) that walks you through
76
+ setup and usage lives at
77
+ [dvm-eahelper-skills](https://github.com/divyavanmahajan/dvm-eahelper-skills).
78
+
79
+ ## Migrating from dvm-leanix / dvm-eagraph
80
+
81
+ | Old | New |
82
+ |---|---|
83
+ | `dvm-leanix serve` / `lean-ix serve` | `eahelper proxy` |
84
+ | `dvm-leanix download` | `eahelper download` |
85
+ | `dvm-leanix diagnose` | `eahelper diagnose` |
86
+ | `dvm-eagraph` | `eahelper load` |
87
+ | `dvm-eagraph-seed` | `eahelper seed` |
88
+
89
+ Token store moved from `~/.lean-ix/` to `~/.eahelper/`.
90
+
91
+ ## License
92
+
93
+ MIT
@@ -0,0 +1,69 @@
1
+ [project]
2
+ name = "dvm-eahelper"
3
+ dynamic = ["version"]
4
+ description = "LeanIX enterprise-architecture helper: GraphQL proxy, factsheet download, and graph loading into KuzuDB or Neo4j"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ license = { text = "MIT" }
8
+ authors = [
9
+ { name = "Divya Van Mahajan", email = "divyavanmahajan@users.noreply.github.com" },
10
+ ]
11
+ keywords = ["leanix", "graphql", "kuzu", "neo4j", "enterprise-architecture"]
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "Environment :: Console",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: Microsoft :: Windows",
18
+ "Operating System :: MacOS",
19
+ "Operating System :: POSIX",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Topic :: Internet :: WWW/HTTP",
25
+ "Topic :: Software Development :: Libraries :: Python Modules",
26
+ ]
27
+ dependencies = [
28
+ "fastapi>=0.115",
29
+ "uvicorn[standard]>=0.32",
30
+ "httpx>=0.27",
31
+ "playwright>=1.49",
32
+ "kuzu>=0.7",
33
+ "neo4j>=5.0",
34
+ "python-dotenv>=1.0",
35
+ "pyyaml>=6.0",
36
+ ]
37
+
38
+ [project.urls]
39
+ Homepage = "https://github.com/divyavanmahajan/dvm-eahelper"
40
+ Source = "https://github.com/divyavanmahajan/dvm-eahelper"
41
+ "Bug Tracker" = "https://github.com/divyavanmahajan/dvm-eahelper/issues"
42
+
43
+ [project.scripts]
44
+ eahelper = "dvm_eahelper.cli:main"
45
+ dvm-eahelper = "dvm_eahelper.cli:main"
46
+
47
+ [build-system]
48
+ requires = ["hatchling", "hatch-vcs"]
49
+ build-backend = "hatchling.build"
50
+
51
+ [tool.hatch.version]
52
+ source = "vcs"
53
+
54
+ [tool.hatch.build.hooks.vcs]
55
+ version-file = "src/dvm_eahelper/_version.py"
56
+
57
+ [tool.hatch.build.targets.wheel]
58
+ packages = ["src/dvm_eahelper"]
59
+
60
+ [dependency-groups]
61
+ dev = ["ruff>=0.9"]
62
+
63
+ [tool.ruff]
64
+ target-version = "py311"
65
+ line-length = 120
66
+
67
+ [tool.ruff.lint]
68
+ select = ["E", "F", "I", "W", "UP"]
69
+ ignore = ["E501"]
@@ -0,0 +1,4 @@
1
+ try:
2
+ from ._version import __version__
3
+ except ImportError:
4
+ __version__ = "0.0.0"
@@ -0,0 +1,4 @@
1
+ from .cli import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
@@ -0,0 +1,24 @@
1
+ # file generated by vcs-versioning
2
+ # don't change, don't track in version control
3
+ from __future__ import annotations
4
+
5
+ __all__ = [
6
+ "__version__",
7
+ "__version_tuple__",
8
+ "version",
9
+ "version_tuple",
10
+ "__commit_id__",
11
+ "commit_id",
12
+ ]
13
+
14
+ version: str
15
+ __version__: str
16
+ __version_tuple__: tuple[int | str, ...]
17
+ version_tuple: tuple[int | str, ...]
18
+ commit_id: str | None
19
+ __commit_id__: str | None
20
+
21
+ __version__ = version = '0.1.0'
22
+ __version_tuple__ = version_tuple = (0, 1, 0)
23
+
24
+ __commit_id__ = commit_id = None