Skip to main content

Universal Python documentation generator with 40+ Sphinx extensions pre-configured. Zero-configuration setup for beautiful, professional documentation.

Project description

PyDevelop-Docs

Universal Python documentation generator with 40+ Sphinx extensions pre-configured

PyPI version Python Support License: MIT

Transform any Python project into beautiful, professional documentation with zero configuration. PyDevelop-Docs automatically detects your project structure and generates a complete Sphinx documentation setup with modern themes, extensive features, and intelligent API documentation.

โœจ Features

๐ŸŽฏ Zero Configuration

  • Works immediately with any Python project structure
  • Automatic detection of monorepos, single packages, src layouts, flat layouts
  • Smart path configuration for AutoAPI and asset management
  • Intelligent metadata extraction from pyproject.toml, setup.py

๐Ÿ“ฆ Universal Project Support

  • Monorepos: packages/package-name/ structures
  • Src Layout: src/package_name/ organization
  • Flat Layout: Package in project root
  • Simple Projects: Basic Python files

๐ŸŽจ Professional Appearance

  • Beautiful Furo theme with dark mode support
  • Responsive design for all devices
  • Custom CSS enhancements for better readability
  • Professional navigation with hierarchical organization

๐Ÿ”ง 40+ Pre-configured Extensions

  • AutoAPI with hierarchical organization (not flat alphabetical!)
  • Syntax highlighting with copy buttons
  • Mermaid diagrams and PlantUML support
  • Interactive elements with sphinx-design
  • SEO optimization with sitemaps and OpenGraph
  • And much more! See complete extension list

โšก Smart CLI Commands

  • setup-general: Analyze and set up any Python project
  • copy-setup: Transfer documentation between projects
  • Interactive and non-interactive modes available
  • Dry-run capability for previewing actions

๐Ÿš€ Quick Start

Installation

pip install pydevelop-docs

One-Command Setup

# Set up documentation for any Python project
pydevelop-docs setup-general /path/to/your/project

# Navigate and build
cd /path/to/your/project/docs
make html

# Your documentation is ready at build/html/index.html! ๐ŸŽ‰

That's it! PyDevelop-Docs automatically:

  • โœ… Detects your project type and structure
  • โœ… Configures 40+ Sphinx extensions
  • โœ… Sets up AutoAPI with proper paths
  • โœ… Creates professional homepage and navigation
  • โœ… Installs beautiful theme with custom styling

๐Ÿ“‹ Project Types Supported

Monorepo Structure

my-monorepo/
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ package-a/
โ”‚   โ”‚   โ””โ”€โ”€ src/package_a/
โ”‚   โ”œโ”€โ”€ package-b/ 
โ”‚   โ”‚   โ””โ”€โ”€ src/package_b/
โ”‚   โ””โ”€โ”€ package-c/
โ”‚       โ””โ”€โ”€ src/package_c/
โ””โ”€โ”€ pyproject.toml

Detection: โœ… Monorepo | AutoAPI: ['../packages']

Src Layout

my-package/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ my_package/
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ docs/  # โ† Created here
โ””โ”€โ”€ pyproject.toml

Detection: โœ… Single Package | AutoAPI: ['../../src']

Flat Layout

my-package/
โ”œโ”€โ”€ my_package/
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ docs/  # โ† Created here
โ””โ”€โ”€ pyproject.toml

Detection: โœ… Single Package | AutoAPI: ['../my_package']

Simple Project

my-scripts/
โ”œโ”€โ”€ main.py
โ”œโ”€โ”€ utils.py
โ”œโ”€โ”€ docs/  # โ† Created here
โ””โ”€โ”€ requirements.txt

Detection: โœ… Simple Project | AutoAPI: ['..']

๐Ÿ› ๏ธ Usage Examples

Command Line Interface

# Interactive setup with project analysis
pydevelop-docs setup-general /path/to/project

# Non-interactive setup
pydevelop-docs setup-general /path/to/project --non-interactive --force

# Preview what will be created
pydevelop-docs setup-general /path/to/project --dry-run

# Custom documentation directory
pydevelop-docs setup-general /path/to/project --target-dir /custom/docs/path

# Copy documentation setup between projects
pydevelop-docs copy-setup /source/project /destination/project --include-config

Python API

from pydevelop_docs import setup_project_docs

# One-line setup
result = setup_project_docs("/path/to/project")
print(f"Documentation created at: {result['target_dir']}")

# Non-interactive with custom options
result = setup_project_docs(
    "/path/to/project",
    target_dir="/custom/location",
    force=True,
    interactive=False
)

# Preview without executing
plan = setup_project_docs("/path/to/project", dry_run=True)
for action in plan['actions']:
    print(f"Would create: {action}")

Advanced Configuration

from pydevelop_docs.config import get_haive_config

# Get pre-configured Sphinx configuration
config = get_haive_config(
    package_name="my-package",
    package_path="/path/to/package"
)

# Use in your docs/source/conf.py
globals().update(config)

Project Analysis

from pydevelop_docs.general_setup import ProjectDetector
from pathlib import Path

# Analyze any Python project
detector = ProjectDetector(Path("/path/to/project"))
info = detector.detect_project_type()

print(f"Project type: {info['type']}")  # monorepo, single_package, etc.
print(f"Package manager: {info['package_manager']}")  # poetry, setuptools, etc.
print(f"Found {len(info['packages'])} packages")
print(f"Structure: {info['structure']['pattern']}")

๐Ÿ“– Generated Documentation Structure

PyDevelop-Docs creates a complete documentation setup:

docs/
โ”œโ”€โ”€ Makefile                    # Build automation
โ”œโ”€โ”€ requirements.txt            # Documentation dependencies  
โ”œโ”€โ”€ source/
โ”‚   โ”œโ”€โ”€ conf.py                # Complete Sphinx configuration
โ”‚   โ”œโ”€โ”€ index.rst              # Professional homepage
โ”‚   โ”œโ”€โ”€ _static/               # CSS, JavaScript, assets
โ”‚   โ”‚   โ”œโ”€โ”€ css/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ custom.css     # Custom styling
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ furo-intense.css # Dark mode fixes
โ”‚   โ”‚   โ””โ”€โ”€ js/
โ”‚   โ”‚       โ””โ”€โ”€ api-enhancements.js
โ”‚   โ”œโ”€โ”€ _templates/            # Custom Jinja2 templates
โ”‚   โ””โ”€โ”€ autoapi/               # Auto-generated API docs
โ”‚       โ””โ”€โ”€ index.rst          # API reference (hierarchical!)
โ””โ”€โ”€ build/
    โ””โ”€โ”€ html/                  # Built documentation
        โ””โ”€โ”€ index.html         # Your beautiful docs! ๐ŸŽ‰

๐ŸŽจ Theme and Styling

Furo Theme with Enhancements

  • Modern responsive design that works on all devices
  • Dark/light mode toggle with proper contrast
  • Smooth animations and professional typography
  • Enhanced navigation with improved sidebar
  • Custom color scheme optimized for readability

Key Styling Features

  • Hierarchical API navigation (not flat alphabetical lists!)
  • Improved code block styling with copy buttons
  • Better table and admonition styling
  • Enhanced mobile experience
  • Professional color scheme with accessibility focus

๐Ÿ”ง Included Extensions

PyDevelop-Docs includes 40+ carefully selected and pre-configured Sphinx extensions:

Core Documentation

  • sphinx.ext.autodoc - Automatic API documentation
  • sphinx.ext.napoleon - Google/NumPy docstring support
  • sphinx.ext.viewcode - Source code links
  • sphinx.ext.intersphinx - Cross-project linking

API Documentation

  • autoapi.extension - Automatic API reference (with hierarchical fix!)
  • sphinx_autodoc_typehints - Type hint documentation
  • sphinxcontrib.autodoc_pydantic - Pydantic model documentation

Enhanced Features

  • myst_parser - Markdown support
  • sphinx_copybutton - Copy code buttons
  • sphinx_design - Modern UI components
  • sphinx_tabs - Tabbed content
  • sphinxcontrib.mermaid - Diagram support

SEO and Discovery

  • sphinx_sitemap - SEO sitemaps
  • sphinxext.opengraph - Social media previews
  • sphinx_favicon - Custom favicons

And Many More!

See the complete extension list with configuration details.

โš™๏ธ Configuration Details

AutoAPI Hierarchical Organization

The Problem: Default AutoAPI creates flat, alphabetical lists of 200+ classes that are impossible to navigate.

Our Solution: Hierarchical organization that follows your project structure:

# Key configuration in generated conf.py
autoapi_own_page_level = "module"  # Keep classes with their modules!
autoapi_options = [
    "members",
    "undoc-members", 
    "show-inheritance",
    "show-module-summary",  # Enables hierarchical grouping
]

Result: Beautiful organized navigation like:

๐Ÿ“ฆ my_package
โ”œโ”€โ”€ ๐Ÿ“ core
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ engine (3 classes)
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ schema (5 classes)  
โ””โ”€โ”€ ๐Ÿ“ utils
    โ””โ”€โ”€ ๐Ÿ“„ helpers (2 functions)

Instead of:

โŒ All Classes (A-Z)
โ”œโ”€โ”€ AgentConfig
โ”œโ”€โ”€ BaseModel
โ”œโ”€โ”€ Calculator
โ”œโ”€โ”€ [197 more in flat list...]

Smart Path Detection

PyDevelop-Docs automatically configures AutoAPI directories based on your project structure:

  • Monorepo: autoapi_dirs = ['../packages']
  • Src Layout: autoapi_dirs = ['../../src']
  • Flat Layout: autoapi_dirs = ['../package_name']
  • Simple Project: autoapi_dirs = ['..']

No manual configuration needed! ๐ŸŽฏ

๐Ÿšง Development

Setting up for Development

git clone https://github.com/your-org/pydevelop-docs.git
cd pydevelop-docs

# Install with development dependencies
poetry install --with dev,docs

# Run tests
poetry run pytest

# Build documentation
cd docs && make html

Running Tests

# Full test suite
poetry run pytest

# Test with coverage
poetry run pytest --cov=pydevelop_docs

# Test specific functionality
poetry run pytest tests/test_general_setup.py -v

Building Documentation

# Build your own docs (meta!)
cd docs
make html

# Or use the tool on itself
pydevelop-docs setup-general . --force
cd docs && make html

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

Quick Contribution Setup

# Fork and clone
git clone https://github.com/your-username/pydevelop-docs.git
cd pydevelop-docs

# Install development dependencies  
poetry install --with dev,docs,test

# Create feature branch
git checkout -b feature/your-feature-name

# Make changes and test
poetry run pytest
poetry run ruff check
poetry run mypy

# Submit pull request! ๐ŸŽ‰

๐Ÿ“Š Comparison

Feature PyDevelop-Docs Manual Sphinx Other Tools
Setup Time < 1 minute Hours Minutes
Project Detection โœ… Automatic โŒ Manual โš ๏ธ Limited
Extension Count 40+ 0 5-10
Theme Quality โœ… Professional โš ๏ธ Basic โš ๏ธ Varies
AutoAPI Hierarchy โœ… Fixed โŒ Flat โŒ Flat
Mobile Responsive โœ… Yes โŒ No โš ๏ธ Sometimes
Dark Mode โœ… Yes โŒ No โš ๏ธ Sometimes
SEO Ready โœ… Yes โŒ No โŒ No

๐Ÿ“œ License

MIT License - see LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Sphinx Team - For the amazing documentation framework
  • Furo Theme - For the beautiful modern theme
  • AutoAPI - For automatic API documentation
  • All Extension Authors - For creating the tools that make this possible

๐Ÿ‘จโ€๐Ÿ’ป Author

William R. Astley

๐Ÿ“ž Support


๐Ÿš€ From zero to professional documentation in under a minute!

Made with โค๏ธ for the Python community

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

pydevelop_docs-1.0.0.tar.gz (177.8 kB view details)

Uploaded Source

Built Distribution

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

pydevelop_docs-1.0.0-py3-none-any.whl (214.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pydevelop_docs-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5231cfe365aad2f423cbbbf88fc12df22a370fe242ee55e1fea566d2742355cf
MD5 3ae21b2923cdd0ba1b8352b361add2a8
BLAKE2b-256 46b48858ddf7f373c6dbb1c4798a834557013fc4efb8e653fe5e0a3d1b2bf1ac

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pydevelop_docs-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5b22120a775cffba9e99185414afb14714e79a52fa338a0eefee43ca7a0e064
MD5 5231d71f469b3d1cc19f991ef8ac99c8
BLAKE2b-256 184d8f70ace6f2fc218c9f08de977b806ece7b1b38757bd0465441620eea0b56

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