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 pydvlp-docs

One-Command Setup

# Set up documentation for any Python project
pydvlp-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
pydvlp-docs setup-general /path/to/project

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

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

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

# Copy documentation setup between projects
pydvlp-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/pydvlp-docs.git
cd pydvlp-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
pydvlp-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/pydvlp-docs.git
cd pydvlp-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

pydvlp_docs-0.1.3.tar.gz (177.9 kB view details)

Uploaded Source

Built Distribution

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

pydvlp_docs-0.1.3-py3-none-any.whl (214.0 kB view details)

Uploaded Python 3

File details

Details for the file pydvlp_docs-0.1.3.tar.gz.

File metadata

  • Download URL: pydvlp_docs-0.1.3.tar.gz
  • Upload date:
  • Size: 177.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for pydvlp_docs-0.1.3.tar.gz
Algorithm Hash digest
SHA256 326aa40c5ebf7465f13e67b9acb355a01b7cf03f0a90c022acb793c828c8dd1d
MD5 2816abe2938c31fd816ef6e9d8a141c7
BLAKE2b-256 bc0c4502f0321be72a95328696eee88de1208917a36a2de8e41830550aa80c00

See more details on using hashes here.

File details

Details for the file pydvlp_docs-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pydvlp_docs-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 214.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for pydvlp_docs-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 36775876a2710e838bed742f8ae155313d28d00920291f45f062acf8eca1cd0e
MD5 a65625635dfa201714573bf2a5aeec4f
BLAKE2b-256 66706d4331b9b3f69b0b45a7bd628a301d0df7b901182bfde22973a7ede2e16c

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