fastapi-voyager 0.7.4__tar.gz → 0.7.6__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 (48) hide show
  1. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/PKG-INFO +23 -4
  2. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/README.md +22 -3
  3. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/version.py +1 -1
  4. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/index.html +11 -7
  5. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/vue-main.js +3 -29
  6. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/.gitignore +0 -0
  7. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/.python-version +0 -0
  8. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/LICENSE +0 -0
  9. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/pyproject.toml +0 -0
  10. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/__init__.py +0 -0
  11. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/cli.py +0 -0
  12. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/filter.py +0 -0
  13. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/module.py +0 -0
  14. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/render.py +0 -0
  15. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/server.py +0 -0
  16. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/type.py +0 -0
  17. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/type_helper.py +0 -0
  18. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/voyager.py +0 -0
  19. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/component/render-graph.js +0 -0
  20. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/component/route-code-display.js +0 -0
  21. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/component/schema-code-display.js +0 -0
  22. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/component/schema-field-filter.js +0 -0
  23. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/graph-ui.js +0 -0
  24. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/graphviz.svg.css +0 -0
  25. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/graphviz.svg.js +0 -0
  26. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/icon/android-chrome-192x192.png +0 -0
  27. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/icon/android-chrome-512x512.png +0 -0
  28. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/icon/apple-touch-icon.png +0 -0
  29. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/icon/favicon-16x16.png +0 -0
  30. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/icon/favicon-32x32.png +0 -0
  31. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/icon/favicon.ico +0 -0
  32. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/icon/site.webmanifest +0 -0
  33. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/quasar.min.css +0 -0
  34. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/src/fastapi_voyager/web/quasar.min.js +0 -0
  35. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/tests/__init__.py +0 -0
  36. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/tests/demo.py +0 -0
  37. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/tests/demo_anno.py +0 -0
  38. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/tests/programatic.py +0 -0
  39. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/tests/service/__init__.py +0 -0
  40. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/tests/service/schema.py +0 -0
  41. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/tests/test_analysis.py +0 -0
  42. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/tests/test_filter.py +0 -0
  43. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/tests/test_generic.py +0 -0
  44. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/tests/test_import.py +0 -0
  45. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/tests/test_module.py +0 -0
  46. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/tests/test_type_helper.py +0 -0
  47. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/uv.lock +0 -0
  48. {fastapi_voyager-0.7.4 → fastapi_voyager-0.7.6}/voyager.jpg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi-voyager
3
- Version: 0.7.4
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
- - [ ] display standard ER diagram `difficult`
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
- - [ ] refactor
189
- - [ ] abstract render module
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.
@@ -17,6 +17,9 @@ pip install fastapi-voyager
17
17
  uv add fastapi-voyager
18
18
  ```
19
19
 
20
+ ```shell
21
+ voyager -m path.to.your.app.module --server
22
+ ```
20
23
 
21
24
  ## Dependencies
22
25
 
@@ -71,6 +74,18 @@ click a node to highlight it's upperstream and downstream nodes. figure out the
71
74
  <img width="882" height="445" alt="image" src="https://github.com/user-attachments/assets/158560ef-63ca-4991-9b7d-587be4fa04e4" />
72
75
 
73
76
 
77
+ ## Mount to target project
78
+
79
+ ```python
80
+ from fastapi import FastAPI
81
+ from fastapi_voyager.server import create_app_with_fastapi
82
+ from tests.demo import app
83
+
84
+ app.mount('/voyager', create_app_with_fastapi(app))
85
+ ```
86
+
87
+ more about [sub application](https://fastapi.tiangolo.com/advanced/sub-applications/?h=sub)
88
+
74
89
 
75
90
  ## Command Line Usage
76
91
 
@@ -143,9 +158,11 @@ features:
143
158
  - [ ] click field to highlight links
144
159
  - [ ] user can generate nodes/edges manually and connect to generated ones
145
160
  - [ ] add owner
161
+ - [ ] add extra info for schema
146
162
  - [ ] ui optimization
147
163
  - [ ] fixed left/right bar show field information
148
- - [ ] display standard ER diagram `difficult`
164
+ - [x] fixed left bar show tag/ route
165
+ - [ ] display standard ER diagram `difference`
149
166
  - [ ] display potential invalid links
150
167
  - [ ] integration with pydantic-resolve
151
168
  - [ ] show difference between resolve, post fields
@@ -158,8 +175,8 @@ features:
158
175
  bugs & non feature:
159
176
  - [x] fix duplicated link from class and parent class, it also break clicking highlight
160
177
  - [ ] add tests
161
- - [ ] refactor
162
- - [ ] abstract render module
178
+ - [x] refactor
179
+ - [x] abstract render module
163
180
 
164
181
  ## Using with pydantic-resolve
165
182
 
@@ -177,6 +194,8 @@ TODO: ...
177
194
  ## Changelog
178
195
 
179
196
  - 0.7:
197
+ - 0.7.5
198
+ - fix show all display issue
180
199
  - 0.7.4
181
200
  - optimize tag/route, move to left.
182
201
  - fresh on change, no need to click generate any more.
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "0.7.4"
2
+ __version__ = "0.7.6"
@@ -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 ? 'bg-primary text-white text-weight-medium' : 'text-weight-medium'"
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 no-wrap" style="width: 100%">
195
- <div class="col text-body2">{{ tag.name }}</div>
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>{{ route.name }}</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>
@@ -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 = state.routeId === routeId ? "" : 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
  }
File without changes
File without changes