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
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 projectcopy-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 documentationsphinx.ext.napoleon- Google/NumPy docstring supportsphinx.ext.viewcode- Source code linkssphinx.ext.intersphinx- Cross-project linking
API Documentation
autoapi.extension- Automatic API reference (with hierarchical fix!)sphinx_autodoc_typehints- Type hint documentationsphinxcontrib.autodoc_pydantic- Pydantic model documentation
Enhanced Features
myst_parser- Markdown supportsphinx_copybutton- Copy code buttonssphinx_design- Modern UI componentssphinx_tabs- Tabbed contentsphinxcontrib.mermaid- Diagram support
SEO and Discovery
sphinx_sitemap- SEO sitemapssphinxext.opengraph- Social media previewssphinx_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
- Website: will.astley.dev
- GitHub: @pr1m8
๐ Support
- Documentation: Full Documentation
- Issues: GitHub Issues
- Discussions: GitHub Discussions
๐ From zero to professional documentation in under a minute!
Made with โค๏ธ for the Python community
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5231cfe365aad2f423cbbbf88fc12df22a370fe242ee55e1fea566d2742355cf
|
|
| MD5 |
3ae21b2923cdd0ba1b8352b361add2a8
|
|
| BLAKE2b-256 |
46b48858ddf7f373c6dbb1c4798a834557013fc4efb8e653fe5e0a3d1b2bf1ac
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5b22120a775cffba9e99185414afb14714e79a52fa338a0eefee43ca7a0e064
|
|
| MD5 |
5231d71f469b3d1cc19f991ef8ac99c8
|
|
| BLAKE2b-256 |
184d8f70ace6f2fc218c9f08de977b806ece7b1b38757bd0465441620eea0b56
|