fastapi-voyager 0.12.1__tar.gz → 0.12.2__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.
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/PKG-INFO +5 -6
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/README.md +4 -5
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/docs/changelog.md +2 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/server.py +20 -2
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/version.py +1 -1
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/index.html +2 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/tests/programatic.py +1 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/.github/workflows/publish.yml +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/.gitignore +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/.python-version +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/LICENSE +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/docs/idea.md +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/pyproject.toml +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/release.md +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/__init__.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/cli.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/filter.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/module.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/render.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/type.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/type_helper.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/voyager.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/component/render-graph.js +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/component/route-code-display.js +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/component/schema-code-display.js +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/component/schema-field-filter.js +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/graph-ui.js +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/graphviz.svg.css +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/graphviz.svg.js +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/icon/android-chrome-192x192.png +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/icon/android-chrome-512x512.png +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/icon/apple-touch-icon.png +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/icon/favicon-16x16.png +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/icon/favicon-32x32.png +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/icon/favicon.ico +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/icon/site.webmanifest +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/quasar.min.css +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/quasar.min.js +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/vue-main.js +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/tests/__init__.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/tests/demo.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/tests/demo_anno.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/tests/service/__init__.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/tests/service/schema.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/tests/test_analysis.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/tests/test_filter.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/tests/test_generic.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/tests/test_import.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/tests/test_module.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/tests/test_type_helper.py +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/uv.lock +0 -0
- {fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/voyager.jpg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-voyager
|
|
3
|
-
Version: 0.12.
|
|
3
|
+
Version: 0.12.2
|
|
4
4
|
Summary: Visualize FastAPI application's routing tree and dependencies
|
|
5
5
|
Project-URL: Homepage, https://github.com/allmonday/fastapi-voyager
|
|
6
6
|
Project-URL: Source, https://github.com/allmonday/fastapi-voyager
|
|
@@ -40,6 +40,10 @@ Visualize your FastAPI endpoints, and explore them interactively.
|
|
|
40
40
|
|
|
41
41
|
<img width="1600" height="986" alt="image" src="https://github.com/user-attachments/assets/8829cda0-f42d-4c84-be2f-b019bb5fe7e1" />
|
|
42
42
|
|
|
43
|
+
## Plan & Raodmap
|
|
44
|
+
- [ideas](./docs/idea.md)
|
|
45
|
+
- [changelog & roadmap](./docs/changelog.md)
|
|
46
|
+
|
|
43
47
|
## Installation
|
|
44
48
|
|
|
45
49
|
```bash
|
|
@@ -176,8 +180,3 @@ backend:
|
|
|
176
180
|
- `voyager.py`: main entry
|
|
177
181
|
- `render.py`: generate dot file
|
|
178
182
|
- `server.py`: serve mode
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
## Plan & Raodmap
|
|
182
|
-
- [ideas](./docs/idea.md)
|
|
183
|
-
- [changelog & roadmap](./docs/changelog.md)
|
|
@@ -11,6 +11,10 @@ Visualize your FastAPI endpoints, and explore them interactively.
|
|
|
11
11
|
|
|
12
12
|
<img width="1600" height="986" alt="image" src="https://github.com/user-attachments/assets/8829cda0-f42d-4c84-be2f-b019bb5fe7e1" />
|
|
13
13
|
|
|
14
|
+
## Plan & Raodmap
|
|
15
|
+
- [ideas](./docs/idea.md)
|
|
16
|
+
- [changelog & roadmap](./docs/changelog.md)
|
|
17
|
+
|
|
14
18
|
## Installation
|
|
15
19
|
|
|
16
20
|
```bash
|
|
@@ -147,8 +151,3 @@ backend:
|
|
|
147
151
|
- `voyager.py`: main entry
|
|
148
152
|
- `render.py`: generate dot file
|
|
149
153
|
- `server.py`: serve mode
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
## Plan & Raodmap
|
|
153
|
-
- [ideas](./docs/idea.md)
|
|
154
|
-
- [changelog & roadmap](./docs/changelog.md)
|
|
@@ -6,7 +6,7 @@ from pydantic import BaseModel
|
|
|
6
6
|
from fastapi.responses import HTMLResponse, PlainTextResponse, JSONResponse
|
|
7
7
|
from fastapi.staticfiles import StaticFiles
|
|
8
8
|
from fastapi_voyager.voyager import Voyager
|
|
9
|
-
from fastapi_voyager.type import Tag,
|
|
9
|
+
from fastapi_voyager.type import Tag, CoreData, SchemaNode
|
|
10
10
|
from fastapi_voyager.render import Renderer
|
|
11
11
|
from fastapi_voyager.type_helper import get_source, get_vscode_link
|
|
12
12
|
from fastapi_voyager.version import __version__
|
|
@@ -15,6 +15,22 @@ from fastapi_voyager.version import __version__
|
|
|
15
15
|
WEB_DIR = Path(__file__).parent / "web"
|
|
16
16
|
WEB_DIR.mkdir(exist_ok=True)
|
|
17
17
|
|
|
18
|
+
GA_PLACEHOLDER = "<!-- GA_SNIPPET -->"
|
|
19
|
+
|
|
20
|
+
def _build_ga_snippet(ga_id: Optional[str]) -> str:
|
|
21
|
+
if not ga_id:
|
|
22
|
+
return ""
|
|
23
|
+
|
|
24
|
+
return f""" <script async src="https://www.googletagmanager.com/gtag/js?id={ga_id}"></script>
|
|
25
|
+
<script>
|
|
26
|
+
window.dataLayer = window.dataLayer || [];
|
|
27
|
+
function gtag(){{dataLayer.push(arguments);}}
|
|
28
|
+
gtag('js', new Date());
|
|
29
|
+
|
|
30
|
+
gtag('config', '{ga_id}');
|
|
31
|
+
</script>
|
|
32
|
+
"""
|
|
33
|
+
|
|
18
34
|
INITIAL_PAGE_POLICY = Literal['first', 'full', 'empty']
|
|
19
35
|
|
|
20
36
|
class OptionParam(BaseModel):
|
|
@@ -46,6 +62,7 @@ def create_voyager(
|
|
|
46
62
|
swagger_url: Optional[str] = None,
|
|
47
63
|
online_repo_url: Optional[str] = None,
|
|
48
64
|
initial_page_policy: INITIAL_PAGE_POLICY = 'first',
|
|
65
|
+
ga_id: Optional[str] = None,
|
|
49
66
|
) -> FastAPI:
|
|
50
67
|
router = APIRouter(tags=['fastapi-voyager'])
|
|
51
68
|
|
|
@@ -116,7 +133,8 @@ def create_voyager(
|
|
|
116
133
|
def index():
|
|
117
134
|
index_file = WEB_DIR / "index.html"
|
|
118
135
|
if index_file.exists():
|
|
119
|
-
|
|
136
|
+
content = index_file.read_text(encoding="utf-8")
|
|
137
|
+
return content.replace(GA_PLACEHOLDER, _build_ga_snippet(ga_id))
|
|
120
138
|
# fallback simple page if index.html missing
|
|
121
139
|
return """
|
|
122
140
|
<!doctype html>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__all__ = ["__version__"]
|
|
2
|
-
__version__ = "0.12.
|
|
2
|
+
__version__ = "0.12.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/component/render-graph.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/icon/apple-touch-icon.png
RENAMED
|
File without changes
|
{fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/icon/favicon-16x16.png
RENAMED
|
File without changes
|
{fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/icon/favicon-32x32.png
RENAMED
|
File without changes
|
|
File without changes
|
{fastapi_voyager-0.12.1 → fastapi_voyager-0.12.2}/src/fastapi_voyager/web/icon/site.webmanifest
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|