Skip to main content

Simple Python documentation generator - parse code, generate markdown

Project description

SimplePyDoc 🐍

PyPI version CI License: MIT

Automatically generate simple markdown documentation from Python codebases.

What It Does

SimplePyDoc 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)

pip install simplepydoc

From Source (Development)

# Clone the repository
git clone https://github.com/msodiq19/simplepydoc.git
cd simplepydoc

# Install with Poetry
poetry install

Usage

# 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 SimplePyDoc 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:

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

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

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

SimplePyDoc generates:

# 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

# 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 for development guidelines.

License

MIT - see LICENSE for details.

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

simplepydoc-0.1.2.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

simplepydoc-0.1.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file simplepydoc-0.1.2.tar.gz.

File metadata

  • Download URL: simplepydoc-0.1.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/5.15.0-118-generic

File hashes

Hashes for simplepydoc-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c2e26e454368a8a604b379557fc0dd596a0bf6f9d41d59bbfe9fadf70d1be696
MD5 d5413b43c111924c100bb750a9ec42ae
BLAKE2b-256 26452ab1fb076403f41212c9c219cbf85bf2141b8a0801cebecb3b3d2f188ad8

See more details on using hashes here.

File details

Details for the file simplepydoc-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: simplepydoc-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/5.15.0-118-generic

File hashes

Hashes for simplepydoc-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e161e038e9a1444d081460bc64ee4c12be43ff666546795df76c83a6faba0d32
MD5 4c7a8b47c89ecf99cfdb3589a6cbe7e3
BLAKE2b-256 a738089bd967a90140e97daa227f7c75967e197c4b630560414cfd0708d58bd5

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