Metadata-Version: 2.1
Name: simplepydoc
Version: 0.1.1
Summary: Simple Python documentation generator - parse code, generate markdown
Home-page: https://github.com/msodiq19/llm-docgen
License: MIT
Keywords: documentation,python,markdown,docstring,ast,api-docs
Author: Sodiq Muhammed
Author-email: muhammedsodiq2018@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Documentation
Requires-Dist: click (>=8.1.7,<9.0.0)
Project-URL: Repository, https://github.com/msodiq19/llm-docgen
Description-Content-Type: text/markdown

# PyDocGen 🐍

[![CI](https://github.com/msodiq19/llm-docgen/actions/workflows/ci.yml/badge.svg)](https://github.com/msodiq19/llm-docgen/actions)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

Automatically generate simple markdown documentation from Python codebases.

## What It Does

PyDocGen parses Python files and generates clean markdown documentation showing:

- Classes with their methods and docstrings
- Functions with arguments and docstrings
- Simple, readable API documentation

## Installation

### From PyPI (Recommended)

```bash
pip install simplepydoc
```

### From Source (Development)

```bash
# Clone the repository
git clone https://github.com/msodiq19/llm-docgen.git
cd llm-docgen

# Install with Poetry
poetry install
```

## Usage

```bash
# If installed from PyPI
simplepydoc generate --repo ./src/myproject --output ./docs

# If running from source with Poetry
poetry run simplepydoc generate --repo ./src/myproject --output ./docs

# Example: Generate docs for PyDocGen itself
simplepydoc generate --repo ./src/llm_docgen --output ./docs
```

This creates `docs/API.md` with documentation extracted from your Python code.

## Example Output

Given this Python code:

```python
class Calculator:
    """A simple calculator."""

    def add(self, a, b):
        """Add two numbers."""
        return a + b

def helper():
    """A helper function."""
    pass
```

PyDocGen generates:

```markdown
# myproject API Documentation

## Classes

### Class: `Calculator`

A simple calculator.

**Methods:**

- **`add`**: Add two numbers.

## Functions

### `helper()`

A helper function.
```

## Current Scope (MVP)

- ✅ Python files only
- ✅ Parses classes, methods, and functions
- ✅ Extracts docstrings
- ✅ Generates markdown output
- ❌ No template customization (simple, opinionated format)
- ❌ No notebook support
- ❌ No remote repository cloning (use local paths)

## Development

```bash
# Run tests
poetry run pytest

# Run with coverage
poetry run pytest --cov=src

# Run the CLI during development
poetry run simplepydoc generate --repo ./src/llm_docgen --output ./docs

# Format code
poetry run black src tests

# Lint
poetry run flake8 src tests
```

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.

## License

MIT - see [LICENSE](LICENSE) for details.

