A modular Python API analyzer for Flask, FastAPI, Django, and DRF with AI-powered documentation generation
Project description
API Analyzer
A modular, extensible Python API analyzer that scans codebases and generates comprehensive documentation with AI-powered explanations.
Features
- Multi-Framework Support: Flask, FastAPI, Django, Django REST Framework
- AI-Powered Documentation: Supports Ollama, OpenAI, Claude, and Gemini
- Call Graph Analysis: Visualizes function dependencies
- Database Operation Detection: Identifies DB queries and operations
- MermaidJS Diagrams: Auto-generated architecture diagrams
- File-wise Documentation: AI overviews for every Python file
- Progress Tracking: Real-time progress with ETA
Installation
pip install autodg
Optional Dependencies (AI Features)
Note: AI-powered documentation generation is an experimental feature. For the best local experience, we recommend running Ollama with the
llama3.1model.
To enable support for specific cloud LLM providers, install the package with the corresponding extras:
# OpenAI Support
pip install autodg[openai]
# Claude Support
pip install autodg[claude]
# Gemini Support
pip install autodg[gemini]
# Support for all providers
pip install autodg[all]
Quick Start
autodg --paths /path/to/your/project --output ./docs
Configuration
Create a config.yaml file:
llm:
provider: ollama # Options: ollama, openai, claude, gemini
ollama:
host: http://localhost:11434
model: llama3.1
Usage
# Basic usage
autodg --paths /path/to/project --output ./output
# With LLM explanations
autodg --paths /path/to/project --output ./output --ollama True
Supported Frameworks
- Flask: Routes, Blueprints
- FastAPI: APIRouter, nested routers, class-based routes
- Django: path(), re_path(), FBV, CBV
- DRF: Routers, ViewSets
Output
The analyzer generates:
request_docs/: Documentation for each API endpoint (optional ai explanations)files/: AI-powered overviews of each Python file (optional ai explanations)
License
MIT License - see LICENSE file for details.
Author
Dhinagaran S (atsupp02@gmail.com)
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 autodg-1.0.2.tar.gz.
File metadata
- Download URL: autodg-1.0.2.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
439c76e14c1b2d19bf95736339fc39094331fe2abf7edf228764ee0c6b91235d
|
|
| MD5 |
de5efc71f5dbe73873922475e9cbe207
|
|
| BLAKE2b-256 |
093ac8fc04eaf18e0e19493fde2ad32624f3467dc0ee5a46ae1b72347f42ebd4
|
File details
Details for the file autodg-1.0.2-py3-none-any.whl.
File metadata
- Download URL: autodg-1.0.2-py3-none-any.whl
- Upload date:
- Size: 25.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26d5bb252d3c3f099ebeeb9ba2bf6f42d01bd2300090178ab07d517abb1ed336
|
|
| MD5 |
40419dde230584b0f8184106bdd51cbf
|
|
| BLAKE2b-256 |
a21034e61ad58c53db887039c8182d6581a7a6f03fb8efd28e76d061d7b62dac
|