fastapi-voyager 0.11.8__tar.gz → 0.11.9__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.11.8 → fastapi_voyager-0.11.9}/PKG-INFO +35 -12
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/README.md +34 -11
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/server.py +4 -28
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/type_helper.py +1 -1
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/version.py +1 -1
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/tests/programatic.py +1 -1
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/.github/workflows/publish.yml +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/.gitignore +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/.python-version +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/LICENSE +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/pyproject.toml +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/release.md +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/__init__.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/cli.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/filter.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/module.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/render.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/type.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/voyager.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/component/render-graph.js +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/component/route-code-display.js +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/component/schema-code-display.js +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/component/schema-field-filter.js +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/graph-ui.js +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/graphviz.svg.css +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/graphviz.svg.js +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/icon/android-chrome-192x192.png +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/icon/android-chrome-512x512.png +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/icon/apple-touch-icon.png +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/icon/favicon-16x16.png +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/icon/favicon-32x32.png +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/icon/favicon.ico +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/icon/site.webmanifest +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/index.html +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/quasar.min.css +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/quasar.min.js +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/vue-main.js +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/tests/__init__.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/tests/demo.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/tests/demo_anno.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/tests/service/__init__.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/tests/service/schema.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/tests/test_analysis.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/tests/test_filter.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/tests/test_generic.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/tests/test_import.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/tests/test_module.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/tests/test_type_helper.py +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/uv.lock +0 -0
- {fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/voyager.jpg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-voyager
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.9
|
|
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
|
|
@@ -34,14 +34,7 @@ Description-Content-Type: text/markdown
|
|
|
34
34
|
|
|
35
35
|
> This repo is still in early stage, it supports pydantic v2 only
|
|
36
36
|
|
|
37
|
-
FastAPI
|
|
38
|
-
|
|
39
|
-
- design your API
|
|
40
|
-
- inspect your API
|
|
41
|
-
- refactor your API
|
|
42
|
-
|
|
43
|
-
interactively !!
|
|
44
|
-
|
|
37
|
+
Visualize your FastAPI endpoints, and explore them interactively.
|
|
45
38
|
|
|
46
39
|
[visit online demo](https://www.newsyeah.fun/voyager/) of project: [composition oriented development pattern](https://github.com/allmonday/composition-oriented-development-pattern)
|
|
47
40
|
|
|
@@ -59,6 +52,9 @@ uv add fastapi-voyager
|
|
|
59
52
|
voyager -m path.to.your.app.module --server
|
|
60
53
|
```
|
|
61
54
|
|
|
55
|
+
> *sub_app* is not supported yet.
|
|
56
|
+
|
|
57
|
+
|
|
62
58
|
## Mount into project
|
|
63
59
|
|
|
64
60
|
```python
|
|
@@ -177,6 +173,7 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
177
173
|
- [ ] add route/tag list
|
|
178
174
|
- [ ] type alias should not be kept as node instead of compiling to original type
|
|
179
175
|
- [ ] how to correctly handle the generic type ?
|
|
176
|
+
- [ ] support Google analysis config
|
|
180
177
|
|
|
181
178
|
### in analysis
|
|
182
179
|
- [ ] click field to highlight links
|
|
@@ -278,6 +275,8 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
278
275
|
- [x] fix swagger link
|
|
279
276
|
- 0.11.8
|
|
280
277
|
- [x] fix swagger link in another way
|
|
278
|
+
- 0.11.9
|
|
279
|
+
- [x] replace issubclass with safe_issubclass to prevent exception.
|
|
281
280
|
|
|
282
281
|
#### 0.12
|
|
283
282
|
- [ ] add tests
|
|
@@ -289,12 +288,13 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
289
288
|
- [ ] config release pipeline
|
|
290
289
|
|
|
291
290
|
|
|
292
|
-
##
|
|
291
|
+
## About pydantic-resolve
|
|
293
292
|
|
|
294
|
-
|
|
293
|
+
pydantic-resolve's `@ensure_subset` decorator helps safely pick fields from the 'source class' while indicating the reference from the current class to the base class.
|
|
295
294
|
|
|
296
|
-
pydantic-resolve
|
|
295
|
+
pydantic-resolve is a lightweight tool designed to build complex, nested data in a simple, declarative way. In version 2, it will introduce an important feature: ER model definition, and fastapi-voyager will support and visualize these diagrams.
|
|
297
296
|
|
|
297
|
+
Developers can use fastapi-voyager without needing to know about pydantic-resolve.
|
|
298
298
|
|
|
299
299
|
|
|
300
300
|
## Credits
|
|
@@ -309,3 +309,26 @@ pydantic-resolve's @ensure_subset decorator is helpful to pick fields from `sour
|
|
|
309
309
|
- [pydantic-resolve](https://github.com/allmonday/pydantic-resolve)
|
|
310
310
|
- Quasar
|
|
311
311
|
|
|
312
|
+
|
|
313
|
+
## How to develop & contribute?
|
|
314
|
+
|
|
315
|
+
fork, clone.
|
|
316
|
+
|
|
317
|
+
install uv.
|
|
318
|
+
|
|
319
|
+
```shell
|
|
320
|
+
uv venv
|
|
321
|
+
source .venv/bin/activate
|
|
322
|
+
uv pip install ".[dev]"
|
|
323
|
+
uvicorn tests.programatic:app --reload
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
open `localhost:8000/voyager`
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
frontend: `src/web/vue-main.js`
|
|
330
|
+
backend: `voyager.py`, `render.py`, `server.py`
|
|
331
|
+
|
|
332
|
+
## Branch and Release flow
|
|
333
|
+
|
|
334
|
+
TODO
|
|
@@ -5,14 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
> This repo is still in early stage, it supports pydantic v2 only
|
|
7
7
|
|
|
8
|
-
FastAPI
|
|
9
|
-
|
|
10
|
-
- design your API
|
|
11
|
-
- inspect your API
|
|
12
|
-
- refactor your API
|
|
13
|
-
|
|
14
|
-
interactively !!
|
|
15
|
-
|
|
8
|
+
Visualize your FastAPI endpoints, and explore them interactively.
|
|
16
9
|
|
|
17
10
|
[visit online demo](https://www.newsyeah.fun/voyager/) of project: [composition oriented development pattern](https://github.com/allmonday/composition-oriented-development-pattern)
|
|
18
11
|
|
|
@@ -30,6 +23,9 @@ uv add fastapi-voyager
|
|
|
30
23
|
voyager -m path.to.your.app.module --server
|
|
31
24
|
```
|
|
32
25
|
|
|
26
|
+
> *sub_app* is not supported yet.
|
|
27
|
+
|
|
28
|
+
|
|
33
29
|
## Mount into project
|
|
34
30
|
|
|
35
31
|
```python
|
|
@@ -148,6 +144,7 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
148
144
|
- [ ] add route/tag list
|
|
149
145
|
- [ ] type alias should not be kept as node instead of compiling to original type
|
|
150
146
|
- [ ] how to correctly handle the generic type ?
|
|
147
|
+
- [ ] support Google analysis config
|
|
151
148
|
|
|
152
149
|
### in analysis
|
|
153
150
|
- [ ] click field to highlight links
|
|
@@ -249,6 +246,8 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
249
246
|
- [x] fix swagger link
|
|
250
247
|
- 0.11.8
|
|
251
248
|
- [x] fix swagger link in another way
|
|
249
|
+
- 0.11.9
|
|
250
|
+
- [x] replace issubclass with safe_issubclass to prevent exception.
|
|
252
251
|
|
|
253
252
|
#### 0.12
|
|
254
253
|
- [ ] add tests
|
|
@@ -260,12 +259,13 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
260
259
|
- [ ] config release pipeline
|
|
261
260
|
|
|
262
261
|
|
|
263
|
-
##
|
|
262
|
+
## About pydantic-resolve
|
|
264
263
|
|
|
265
|
-
|
|
264
|
+
pydantic-resolve's `@ensure_subset` decorator helps safely pick fields from the 'source class' while indicating the reference from the current class to the base class.
|
|
266
265
|
|
|
267
|
-
pydantic-resolve
|
|
266
|
+
pydantic-resolve is a lightweight tool designed to build complex, nested data in a simple, declarative way. In version 2, it will introduce an important feature: ER model definition, and fastapi-voyager will support and visualize these diagrams.
|
|
268
267
|
|
|
268
|
+
Developers can use fastapi-voyager without needing to know about pydantic-resolve.
|
|
269
269
|
|
|
270
270
|
|
|
271
271
|
## Credits
|
|
@@ -280,3 +280,26 @@ pydantic-resolve's @ensure_subset decorator is helpful to pick fields from `sour
|
|
|
280
280
|
- [pydantic-resolve](https://github.com/allmonday/pydantic-resolve)
|
|
281
281
|
- Quasar
|
|
282
282
|
|
|
283
|
+
|
|
284
|
+
## How to develop & contribute?
|
|
285
|
+
|
|
286
|
+
fork, clone.
|
|
287
|
+
|
|
288
|
+
install uv.
|
|
289
|
+
|
|
290
|
+
```shell
|
|
291
|
+
uv venv
|
|
292
|
+
source .venv/bin/activate
|
|
293
|
+
uv pip install ".[dev]"
|
|
294
|
+
uvicorn tests.programatic:app --reload
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
open `localhost:8000/voyager`
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
frontend: `src/web/vue-main.js`
|
|
301
|
+
backend: `voyager.py`, `render.py`, `server.py`
|
|
302
|
+
|
|
303
|
+
## Branch and Release flow
|
|
304
|
+
|
|
305
|
+
TODO
|
|
@@ -38,18 +38,15 @@ class Payload(BaseModel):
|
|
|
38
38
|
show_module: bool = True
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
def
|
|
41
|
+
def create_voyager(
|
|
42
42
|
target_app: FastAPI,
|
|
43
43
|
module_color: dict[str, str] | None = None,
|
|
44
|
-
|
|
44
|
+
gzip_minimum_size: int | None = 500,
|
|
45
45
|
module_prefix: Optional[str] = None,
|
|
46
|
+
swagger_url: Optional[str] = None,
|
|
46
47
|
online_repo_url: Optional[str] = None,
|
|
47
48
|
initial_page_policy: INITIAL_PAGE_POLICY = 'first',
|
|
48
|
-
):
|
|
49
|
-
"""
|
|
50
|
-
module_color: dict mapping module name to color string, e.g. {'models': 'lightblue'}
|
|
51
|
-
module_prefix: prefix string to define schemas show in brief mode
|
|
52
|
-
"""
|
|
49
|
+
) -> FastAPI:
|
|
53
50
|
router = APIRouter(tags=['fastapi-voyager'])
|
|
54
51
|
|
|
55
52
|
@router.get("/dot", response_model=OptionParam)
|
|
@@ -207,27 +204,6 @@ def create_route(
|
|
|
207
204
|
content={"error": f"Internal error: {str(e)}"}
|
|
208
205
|
)
|
|
209
206
|
|
|
210
|
-
return router
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
def create_voyager(
|
|
214
|
-
target_app: FastAPI,
|
|
215
|
-
module_color: dict[str, str] | None = None,
|
|
216
|
-
gzip_minimum_size: int | None = 500,
|
|
217
|
-
module_prefix: Optional[str] = None,
|
|
218
|
-
swagger_url: Optional[str] = None,
|
|
219
|
-
online_repo_url: Optional[str] = None,
|
|
220
|
-
initial_page_policy: INITIAL_PAGE_POLICY = 'first',
|
|
221
|
-
) -> FastAPI:
|
|
222
|
-
router = create_route(
|
|
223
|
-
target_app,
|
|
224
|
-
module_color=module_color,
|
|
225
|
-
module_prefix=module_prefix,
|
|
226
|
-
swagger_url=swagger_url,
|
|
227
|
-
online_repo_url=online_repo_url,
|
|
228
|
-
initial_page_policy=initial_page_policy,
|
|
229
|
-
)
|
|
230
|
-
|
|
231
207
|
app = FastAPI(title="fastapi-voyager demo server")
|
|
232
208
|
if gzip_minimum_size is not None and gzip_minimum_size >= 0:
|
|
233
209
|
app.add_middleware(GZipMiddleware, minimum_size=gzip_minimum_size)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__all__ = ["__version__"]
|
|
2
|
-
__version__ = "0.11.
|
|
2
|
+
__version__ = "0.11.9"
|
|
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.11.8 → fastapi_voyager-0.11.9}/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.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/icon/apple-touch-icon.png
RENAMED
|
File without changes
|
{fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/icon/favicon-16x16.png
RENAMED
|
File without changes
|
{fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/src/fastapi_voyager/web/icon/favicon-32x32.png
RENAMED
|
File without changes
|
|
File without changes
|
{fastapi_voyager-0.11.8 → fastapi_voyager-0.11.9}/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
|
|
File without changes
|