{"id":28641018,"url":"https://github.com/dotcs/fastapi-di-viz","last_synced_at":"2025-06-12T20:36:41.402Z","repository":{"id":266059114,"uuid":"891161018","full_name":"dotcs/fastapi-di-viz","owner":"dotcs","description":"A CLI tool to visualize the FastAPI dependency chain","archived":false,"fork":false,"pushed_at":"2024-12-10T20:05:21.000Z","size":34,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2024-12-10T21:20:52.467Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotcs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-19T20:48:39.000Z","updated_at":"2024-12-10T20:04:21.000Z","dependencies_parsed_at":"2024-12-02T18:53:37.576Z","dependency_job_id":null,"html_url":"https://github.com/dotcs/fastapi-di-viz","commit_stats":null,"previous_names":["dotcs/fastapi-di-viz"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dotcs/fastapi-di-viz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcs%2Ffastapi-di-viz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcs%2Ffastapi-di-viz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcs%2Ffastapi-di-viz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcs%2Ffastapi-di-viz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotcs","download_url":"https://codeload.github.com/dotcs/fastapi-di-viz/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcs%2Ffastapi-di-viz/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259522771,"owners_count":22870550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-12T20:36:39.375Z","updated_at":"2025-06-12T20:36:41.390Z","avatar_url":"https://github.com/dotcs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/fastapi-di-viz.svg?icon=si%3Apython)](https://pypi.org/project/fastapi-di-viz/)\n![CI build](https://github.com/dotcs/fastapi-di-viz/actions/workflows/ci.yml/badge.svg?branch=main\u0026event=push)\n\n# FastAPI Dependency Injection Visualizer\n\nThis is a simple tool to visualize the dependency injection tree of a FastAPI application.\nIt 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.\n\nIt automatically detects the endpoints and the dependencies of the application and generates a graph of the dependencies.\n\n## Usage\n\nInstall the package in the environment where your FastAPI application is installed.\n```bash\npip install fastapi-di-viz\n```\n\nThen run the following command to generate the graph:\n```bash\nfastapi-di-viz your_app.main:app\n```\n\nA sample graph for the application in [fastapi_di_viz/sample](./fastapi_di_viz/sample/) looks like this:\n\n```mermaid\n---\ntitle: FastAPI dependency chain\n---\ngraph TD;\n    root --\u003e get_settings\n    a --\u003e get_serviceA\n    get_serviceA --\u003e get_repo\n    get_serviceA --\u003e get_settings\n    b --\u003e get_serviceB\n    get_serviceB --\u003e get_repo\n```\n\nThe tool supports graphs in the following formats:\n\n- Graphviz DOT format\n- Mermaid flowchart format\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotcs%2Ffastapi-di-viz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotcs%2Ffastapi-di-viz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotcs%2Ffastapi-di-viz/lists"}