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
Metadata
Release files for fastapi-di-viz 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fastapi_di_viz-0.2.0.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastapi_di_viz-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / fastapi_di_viz-0.2.0.tar.gz
| Download URL | fastapi_di_viz-0.2.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7df972f3d4d0f2ec1a523a98c0cf76c385cdeb8d29789ce89162df10419c69eb
|
|
BLAKE2b-256 checksum How to use checksums |
8890e7544c1212ba0cbb80dbdc605a6852c092fb34d339e0e587453bea233e87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2024.
Transparency logRelease files / fastapi_di_viz-0.2.0-py3-none-any.whl
| Download URL | fastapi_di_viz-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
334f9a23fbbfd8dfd94be6f0fe65adb5f9ef002e2da24c952c1be683b3ead360
|
|
BLAKE2b-256 checksum How to use checksums |
118cfbcb727944af34507dc54a880d4cb406a652afed5554656dde7d0bdb0f64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2024.
Transparency log