Skip to main content

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.1 model.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autodg-1.0.0.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autodg-1.0.0-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file autodg-1.0.0.tar.gz.

File metadata

  • Download URL: autodg-1.0.0.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for autodg-1.0.0.tar.gz
Algorithm Hash digest
SHA256 05c4ff8c0c19ad1f7bd623fcf438e24bb2aa709a9ec25406e6417f4253f8027c
MD5 c1f5756ef651804ec6819fa969f730e3
BLAKE2b-256 a42198e01b2de1f039cabd087e5b6614c4de347d4097821dd2c1a7bba139a9c0

See more details on using hashes here.

File details

Details for the file autodg-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: autodg-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for autodg-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10a7499746ab022c7a7271f78148cea104853e2c6cd9881da265c434c962d45b
MD5 13703f2a62177c934a7b6c5e7add39ce
BLAKE2b-256 7c33d359e20c9e9a719ac6ab2fc52bc040c91bbad7f1e72e3478a40b3d478830

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page