fastapi-voyager 0.7.4__py3-none-any.whl → 0.7.6__py3-none-any.whl
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/version.py +1 -1
- fastapi_voyager/web/index.html +11 -7
- fastapi_voyager/web/vue-main.js +3 -29
- {fastapi_voyager-0.7.4.dist-info → fastapi_voyager-0.7.6.dist-info}/METADATA +23 -4
- {fastapi_voyager-0.7.4.dist-info → fastapi_voyager-0.7.6.dist-info}/RECORD +8 -8
- {fastapi_voyager-0.7.4.dist-info → fastapi_voyager-0.7.6.dist-info}/WHEEL +0 -0
- {fastapi_voyager-0.7.4.dist-info → fastapi_voyager-0.7.6.dist-info}/entry_points.txt +0 -0
- {fastapi_voyager-0.7.4.dist-info → fastapi_voyager-0.7.6.dist-info}/licenses/LICENSE +0 -0
fastapi_voyager/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__all__ = ["__version__"]
|
|
2
|
-
__version__ = "0.7.
|
|
2
|
+
__version__ = "0.7.6"
|
fastapi_voyager/web/index.html
CHANGED
|
@@ -88,6 +88,9 @@
|
|
|
88
88
|
"
|
|
89
89
|
>
|
|
90
90
|
<div class="row items-center q-col-gutter-md">
|
|
91
|
+
<div class="col-auto">
|
|
92
|
+
<div style="width: 282px; margin-left: 8px;" class="text-h6">FastAPI Voyager</div>
|
|
93
|
+
</div>
|
|
91
94
|
<div class="col-auto">
|
|
92
95
|
<div class="column">
|
|
93
96
|
<q-option-group
|
|
@@ -102,7 +105,7 @@
|
|
|
102
105
|
</div>
|
|
103
106
|
|
|
104
107
|
<div class="col-auto">
|
|
105
|
-
<q-toggle v-model="state.brief" label="Brief" dense />
|
|
108
|
+
<q-toggle class="q-ml-md" v-model="state.brief" label="Brief Mode" title="config module_prefix to enable it" dense />
|
|
106
109
|
</div>
|
|
107
110
|
|
|
108
111
|
<!-- <div class="col-auto">
|
|
@@ -167,7 +170,7 @@
|
|
|
167
170
|
</div>
|
|
168
171
|
</div>
|
|
169
172
|
</div>
|
|
170
|
-
<div class="row no-wrap" style="flex: 1 1 auto; min-height: 0">
|
|
173
|
+
<div class="row no-wrap" style="flex: 1 1 auto; min-height: 0; height: 100px;">
|
|
171
174
|
<div
|
|
172
175
|
class="column no-wrap"
|
|
173
176
|
:style="{
|
|
@@ -184,15 +187,14 @@
|
|
|
184
187
|
v-for="tag in state.rawTags"
|
|
185
188
|
:key="tag.name"
|
|
186
189
|
expand-separator
|
|
187
|
-
switch-toggle-side
|
|
188
190
|
:model-value="state.tag === tag.name"
|
|
189
191
|
@update:model-value="(val) => toggleTag(tag.name, val)"
|
|
190
|
-
:header-class="state.tag === tag.name ? '
|
|
192
|
+
:header-class="state.tag === tag.name ? 'text-primary text-bold' : ''"
|
|
191
193
|
content-class="q-pa-none"
|
|
192
194
|
>
|
|
193
195
|
<template #header>
|
|
194
|
-
<div class="row items-center
|
|
195
|
-
<div class="
|
|
196
|
+
<div class="row items-center" style="width: 100%">
|
|
197
|
+
<div class="">{{ tag.name }}</div>
|
|
196
198
|
</div>
|
|
197
199
|
</template>
|
|
198
200
|
|
|
@@ -206,7 +208,9 @@
|
|
|
206
208
|
active-class=""
|
|
207
209
|
@click="selectRoute(route.id)"
|
|
208
210
|
>
|
|
209
|
-
<q-item-section>
|
|
211
|
+
<q-item-section>
|
|
212
|
+
<span class="q-ml-sm"> {{ route.name }} </span>
|
|
213
|
+
</q-item-section>
|
|
210
214
|
</q-item>
|
|
211
215
|
<q-item v-if="!tag.routes || tag.routes.length === 0" dense>
|
|
212
216
|
<q-item-section class="text-grey-6">No routes</q-item-section>
|
fastapi_voyager/web/vue-main.js
CHANGED
|
@@ -51,20 +51,6 @@ const app = createApp({
|
|
|
51
51
|
showDetail.value = false;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
const skipNextRouteGenerate = ref(false);
|
|
55
|
-
|
|
56
|
-
function applyRoutesForTag(tagName) {
|
|
57
|
-
const tag = state.rawTags.find((t) => t.name === tagName);
|
|
58
|
-
state.routeOptions = [];
|
|
59
|
-
if (tag && Array.isArray(tag.routes)) {
|
|
60
|
-
state.routeOptions.push(
|
|
61
|
-
...tag.routes.map((r) => ({ label: r.name, value: r.id }))
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
skipNextRouteGenerate.value = true;
|
|
65
|
-
state.routeId = "";
|
|
66
|
-
}
|
|
67
|
-
|
|
68
54
|
function onFilterTags(val, update) {
|
|
69
55
|
const normalized = (val || "").toLowerCase();
|
|
70
56
|
update(() => {
|
|
@@ -257,28 +243,16 @@ const app = createApp({
|
|
|
257
243
|
}
|
|
258
244
|
|
|
259
245
|
function selectRoute(routeId) {
|
|
260
|
-
state.routeId =
|
|
246
|
+
state.routeId = routeId
|
|
247
|
+
onGenerate()
|
|
261
248
|
}
|
|
262
249
|
|
|
263
250
|
// react to tag changes to rebuild routes
|
|
264
251
|
watch(
|
|
265
252
|
() => state.tag,
|
|
266
253
|
(val) => {
|
|
267
|
-
applyRoutesForTag(val);
|
|
268
|
-
if (!state.initializing) {
|
|
269
|
-
onGenerate();
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
);
|
|
273
|
-
|
|
274
|
-
watch(
|
|
275
|
-
() => state.routeId,
|
|
276
|
-
() => {
|
|
277
|
-
if (skipNextRouteGenerate.value) {
|
|
278
|
-
skipNextRouteGenerate.value = false;
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
254
|
if (!state.initializing) {
|
|
255
|
+
state.routeId = ''
|
|
282
256
|
onGenerate();
|
|
283
257
|
}
|
|
284
258
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-voyager
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.6
|
|
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
|
|
@@ -44,6 +44,9 @@ pip install fastapi-voyager
|
|
|
44
44
|
uv add fastapi-voyager
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
```shell
|
|
48
|
+
voyager -m path.to.your.app.module --server
|
|
49
|
+
```
|
|
47
50
|
|
|
48
51
|
## Dependencies
|
|
49
52
|
|
|
@@ -98,6 +101,18 @@ click a node to highlight it's upperstream and downstream nodes. figure out the
|
|
|
98
101
|
<img width="882" height="445" alt="image" src="https://github.com/user-attachments/assets/158560ef-63ca-4991-9b7d-587be4fa04e4" />
|
|
99
102
|
|
|
100
103
|
|
|
104
|
+
## Mount to target project
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
from fastapi import FastAPI
|
|
108
|
+
from fastapi_voyager.server import create_app_with_fastapi
|
|
109
|
+
from tests.demo import app
|
|
110
|
+
|
|
111
|
+
app.mount('/voyager', create_app_with_fastapi(app))
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
more about [sub application](https://fastapi.tiangolo.com/advanced/sub-applications/?h=sub)
|
|
115
|
+
|
|
101
116
|
|
|
102
117
|
## Command Line Usage
|
|
103
118
|
|
|
@@ -170,9 +185,11 @@ features:
|
|
|
170
185
|
- [ ] click field to highlight links
|
|
171
186
|
- [ ] user can generate nodes/edges manually and connect to generated ones
|
|
172
187
|
- [ ] add owner
|
|
188
|
+
- [ ] add extra info for schema
|
|
173
189
|
- [ ] ui optimization
|
|
174
190
|
- [ ] fixed left/right bar show field information
|
|
175
|
-
- [
|
|
191
|
+
- [x] fixed left bar show tag/ route
|
|
192
|
+
- [ ] display standard ER diagram `difference`
|
|
176
193
|
- [ ] display potential invalid links
|
|
177
194
|
- [ ] integration with pydantic-resolve
|
|
178
195
|
- [ ] show difference between resolve, post fields
|
|
@@ -185,8 +202,8 @@ features:
|
|
|
185
202
|
bugs & non feature:
|
|
186
203
|
- [x] fix duplicated link from class and parent class, it also break clicking highlight
|
|
187
204
|
- [ ] add tests
|
|
188
|
-
- [
|
|
189
|
-
- [
|
|
205
|
+
- [x] refactor
|
|
206
|
+
- [x] abstract render module
|
|
190
207
|
|
|
191
208
|
## Using with pydantic-resolve
|
|
192
209
|
|
|
@@ -204,6 +221,8 @@ TODO: ...
|
|
|
204
221
|
## Changelog
|
|
205
222
|
|
|
206
223
|
- 0.7:
|
|
224
|
+
- 0.7.5
|
|
225
|
+
- fix show all display issue
|
|
207
226
|
- 0.7.4
|
|
208
227
|
- optimize tag/route, move to left.
|
|
209
228
|
- fresh on change, no need to click generate any more.
|
|
@@ -6,15 +6,15 @@ fastapi_voyager/render.py,sha256=rOJEKqiIAPowa3kZheRIgZMnbNzHQz9QoJM5aWUfXXs,774
|
|
|
6
6
|
fastapi_voyager/server.py,sha256=UT-fHggdqicIo5m3uUX86-XFhAVDLXpXBsBQwd1HdIg,4001
|
|
7
7
|
fastapi_voyager/type.py,sha256=nad4WNxTcZFi7Mskw6p2W7v2Gs4f0giVLNoFjZlKmbA,1778
|
|
8
8
|
fastapi_voyager/type_helper.py,sha256=f2Gy5r3Zi6a2wTkbqU9W-AkvcetajEYCfroACzcIcVY,9064
|
|
9
|
-
fastapi_voyager/version.py,sha256=
|
|
9
|
+
fastapi_voyager/version.py,sha256=Oq-SkiGLvgSaGMuxFQNR6zCOQtBkYc1PpxNgDXQBXrg,48
|
|
10
10
|
fastapi_voyager/voyager.py,sha256=uOQEzrs3o6UUUswvHGRKELNWYUH1ix0Z7SbzMHwm320,10709
|
|
11
11
|
fastapi_voyager/web/graph-ui.js,sha256=eEjDnJVMvk35LdRoxcqX_fZxLFS9_bUrGAZL6K2O5C0,4176
|
|
12
12
|
fastapi_voyager/web/graphviz.svg.css,sha256=zDCjjpT0Idufu5YOiZI76PL70-avP3vTyzGPh9M85Do,1563
|
|
13
13
|
fastapi_voyager/web/graphviz.svg.js,sha256=lvAdbjHc-lMSk4GQp-iqYA2PCFX4RKnW7dFaoe0LUHs,16005
|
|
14
|
-
fastapi_voyager/web/index.html,sha256=
|
|
14
|
+
fastapi_voyager/web/index.html,sha256=VZGdmFtNbZ4qdqb1763lbWW8Ta44ND_uNxyJyWOYsDc,12523
|
|
15
15
|
fastapi_voyager/web/quasar.min.css,sha256=F5jQe7X2XT54VlvAaa2V3GsBFdVD-vxDZeaPLf6U9CU,203145
|
|
16
16
|
fastapi_voyager/web/quasar.min.js,sha256=h0ftyPMW_CRiyzeVfQqiup0vrVt4_QWojpqmpnpn07E,502974
|
|
17
|
-
fastapi_voyager/web/vue-main.js,sha256=
|
|
17
|
+
fastapi_voyager/web/vue-main.js,sha256=GLBePxcTIwFKwAA5WwujtxSpr4o2SmlgTVBgEvrPLto,9200
|
|
18
18
|
fastapi_voyager/web/component/render-graph.js,sha256=e8Xgh2Kl-nYU0P1gstEmAepCgFnk2J6UdxW8TlMafGs,2322
|
|
19
19
|
fastapi_voyager/web/component/route-code-display.js,sha256=NECC1OGcPCdDfbghtRJEnmFM6HmH5J3win2ibapWPeA,2649
|
|
20
20
|
fastapi_voyager/web/component/schema-code-display.js,sha256=oOusgTvCaWGnoKb-NBwu0SXqJJf2PTUtp3lUczokTBM,5515
|
|
@@ -26,8 +26,8 @@ fastapi_voyager/web/icon/favicon-16x16.png,sha256=JC07jEzfIYxBIoQn_FHXvyHuxESdhW
|
|
|
26
26
|
fastapi_voyager/web/icon/favicon-32x32.png,sha256=C7v1h58cfWOsiLp9yOIZtlx-dLasBcq3NqpHVGRmpt4,1859
|
|
27
27
|
fastapi_voyager/web/icon/favicon.ico,sha256=tZolYIXkkBcFiYl1A8ksaXN2VjGamzcSdes838dLvNc,15406
|
|
28
28
|
fastapi_voyager/web/icon/site.webmanifest,sha256=ep4Hzh9zhmiZF2At3Fp1dQrYQuYF_3ZPZxc1KcGBvwQ,263
|
|
29
|
-
fastapi_voyager-0.7.
|
|
30
|
-
fastapi_voyager-0.7.
|
|
31
|
-
fastapi_voyager-0.7.
|
|
32
|
-
fastapi_voyager-0.7.
|
|
33
|
-
fastapi_voyager-0.7.
|
|
29
|
+
fastapi_voyager-0.7.6.dist-info/METADATA,sha256=Q9qB67ItP5pcNEGbM0Rp2n_Aji4PS-R1h7CSvPQyeP4,7810
|
|
30
|
+
fastapi_voyager-0.7.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
31
|
+
fastapi_voyager-0.7.6.dist-info/entry_points.txt,sha256=pEIKoUnIDXEtdMBq8EmXm70m16vELIu1VPz9-TBUFWM,53
|
|
32
|
+
fastapi_voyager-0.7.6.dist-info/licenses/LICENSE,sha256=lNVRR3y_bFVoFKuK2JM8N4sFaj3m-7j29kvL3olFi5Y,1067
|
|
33
|
+
fastapi_voyager-0.7.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|