Skip to content

Xynash/Automated-Python-Docstring-Generator-T-B

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐍 PyDoc AI: Intelligent Documentation Engine

PyDoc AI is a professional-grade, production-ready ecosystem designed to automate the most tedious part of software engineering: documentation. By leveraging Abstract Syntax Trees (AST) and the Llama 3.3 70B model, it performs deep semantic analysis to generate industry-standard docstrings that actually understand your code's intent.

✨ Features

  • πŸ” Logic-Aware Synthesis: Unlike static templates, our AI analyzes the mathematical and logical operations within a function to describe how and why it works.
  • 🌳 AST Precision: Uses Python's Abstract Syntax Tree to surgically identify functions, class scopes, and arguments without ever executing the source code.
  • 🌐 Headless API Architecture: A robust FastAPI backend that can power Web UIs, CLI tools, and IDE extensions (VS Code) simultaneously.
  • 🎨 Enterprise Multi-Style: One-click support for Google, NumPy, and Sphinx documentation standards.
  • πŸ›‘οΈ Defensive Engineering: A built-in Heuristic Fallback system ensures you get documentation even if the AI cloud service is offline.

πŸ› οΈ Tech Stack

  • Frontend: Streamlit (Custom Dark/Neon Engineering Theme).
  • Backend: Python, FastAPI, Uvicorn (Asynchronous Concurrency).
  • Parsing Engine: Python AST (Abstract Syntax Tree).
  • AI Engine: Groq SDK (Llama 3.3 70B Model) for sub-second inference.
  • Environment: Pydantic (Data Models), Python-Dotenv.
πŸ“‚ File Directory Structure

Automated-Python-Docstring-Generator-T-B/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/                # FastAPI Entry point & REST routes
β”‚   β”‚   β”œβ”€β”€ main.py
β”‚   β”‚   └── __init__.py
β”‚   β”œβ”€β”€ core/               # The "Brain" (AST & AI Logic)
β”‚   β”‚   β”œβ”€β”€ parser.py       # Metadata extraction
β”‚   β”‚   β”œβ”€β”€ ai_engine.py    # Logic analysis
β”‚   β”‚   β”œβ”€β”€ inserter.py     # Surgical code injection
β”‚   β”‚   β”œβ”€β”€ prompt_builder.py
β”‚   β”‚   └── ai_docstring_engine.py
β”‚   β”œβ”€β”€ utils/              # File validation & helpers
β”‚   β”œβ”€β”€ streamlit_app.py    # Web-based UI Dashboard
β”‚   └── __init__.py
β”œβ”€β”€ .env                    # API Keys (Environment Variables)
β”œβ”€β”€ .gitignore              # Git exclusion rules
β”œβ”€β”€ requirements.txt        # Project dependencies
└── README.md               # Documentation

# πŸš€ Installation & Setup

### 1. Prerequisites
*   **Python 3.10+**
*   **Groq API Key** (Get it free at [console.groq.com](https://console.groq.com))

### 2. Environment Setup
```bash
# Clone the repository
git clone https://github.com/Xynash/Automated-Python-Docstring-Generator-T-B.git
cd Automated-Python-Docstring-Generator-T-B

# Create and activate a virtual environment
python -m venv venv

# On Windows:
.\venv\Scripts\activate
# On Mac/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

About

AI-powered Python docstring generator that automatically analyzes code and generates professional, standardized documentation in seconds. Supports Google, NumPy, and reStructuredText styles. Saves time, ensures 100% coverage, improves readability, and integrates easily with editors or APIs for seamless workflow.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages