Visualize a FastAPI dependency injection graph
Project description
FastAPI Dependency Injection Visualizer
This is a simple tool to visualize the dependency injection tree of a FastAPI application. It works by inspecting the FastAPI application and generating a graph of the dependencies from walking the dependency injection tree starting from the application's endpoints.
It automatically detects the endpoints and the dependencies of the application and generates a graph of the dependencies.
Usage
Install the package in the environment where your FastAPI application is installed.
pip install fastapi-di-viz
Then run the following command to generate the graph:
fastapi-di-viz your_app.main:app
A sample graph for the application in fastapi_di_viz/sample looks like this:
---
title: FastAPI dependency chain
---
graph TD;
root --> get_settings
a --> get_serviceA
get_serviceA --> get_repo
get_serviceA --> get_settings
b --> get_serviceB
get_serviceB --> get_repo
The tool supports graphs in the following formats:
- Graphviz DOT format
- Mermaid flowchart format
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastapi_di_viz-0.2.0.tar.gz.
File metadata
- Download URL: fastapi_di_viz-0.2.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7df972f3d4d0f2ec1a523a98c0cf76c385cdeb8d29789ce89162df10419c69eb
|
|
| MD5 |
e4780067235646af28b831f52ebe2135
|
|
| BLAKE2b-256 |
8890e7544c1212ba0cbb80dbdc605a6852c092fb34d339e0e587453bea233e87
|
Provenance
The following attestation bundles were made for fastapi_di_viz-0.2.0.tar.gz:
Publisher:
ci.yml on dotcs/fastapi-di-viz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastapi_di_viz-0.2.0.tar.gz -
Subject digest:
7df972f3d4d0f2ec1a523a98c0cf76c385cdeb8d29789ce89162df10419c69eb - Sigstore transparency entry: 152811419
- Sigstore integration time:
-
Permalink:
dotcs/fastapi-di-viz@e2a5d01b66fb5a6078802a7aa54a035969cfd96b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dotcs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@e2a5d01b66fb5a6078802a7aa54a035969cfd96b -
Trigger Event:
push
-
Statement type:
File details
Details for the file fastapi_di_viz-0.2.0-py3-none-any.whl.
File metadata
- Download URL: fastapi_di_viz-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
334f9a23fbbfd8dfd94be6f0fe65adb5f9ef002e2da24c952c1be683b3ead360
|
|
| MD5 |
18771fce90fabb1278ca34b853a9b222
|
|
| BLAKE2b-256 |
118cfbcb727944af34507dc54a880d4cb406a652afed5554656dde7d0bdb0f64
|
Provenance
The following attestation bundles were made for fastapi_di_viz-0.2.0-py3-none-any.whl:
Publisher:
ci.yml on dotcs/fastapi-di-viz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastapi_di_viz-0.2.0-py3-none-any.whl -
Subject digest:
334f9a23fbbfd8dfd94be6f0fe65adb5f9ef002e2da24c952c1be683b3ead360 - Sigstore transparency entry: 152811420
- Sigstore integration time:
-
Permalink:
dotcs/fastapi-di-viz@e2a5d01b66fb5a6078802a7aa54a035969cfd96b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dotcs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@e2a5d01b66fb5a6078802a7aa54a035969cfd96b -
Trigger Event:
push
-
Statement type: