This directory contains the Sphinx documentation for the RunPod Python SDK. This guide will help you set up, build, and contribute to the documentation.
Before you begin, ensure you have Python 3.7+ installed. You'll also need to install the documentation dependencies:
pip install -r requirements.txtTo build the documentation:
-
Navigate to the docs directory:
cd docs -
Build the HTML documentation:
make html
The built documentation will be available in build/html/. Open build/html/index.html in your web browser to view it.
-
Clean and rebuild:
make clean html
-
Build specific formats:
make latexpdf # Build PDF documentation make epub # Build EPUB documentation
docs/
├── Makefile # Build system
├── requirements.txt # Documentation dependencies
├── source/
│ ├── conf.py # Sphinx configuration
│ ├── index.rst # Documentation homepage
│ ├── installation.rst # Installation guide
│ ├── quickstart.rst # Getting started guide
│ ├── api/ # API reference
│ │ ├── index.rst # API overview
│ │ ├── error.rst # Error handling
│ │ ├── http_client.rst # HTTP client
│ │ └── serverless/ # Serverless components
│ │ ├── core.rst # Core functionality
│ │ ├── worker.rst # Worker implementation
│ │ └── modules/ # Additional modules
│ └── _static/ # Static files (images, custom CSS)
└── build/ # Built documentation
└── html/ # HTML output
If you see warnings about missing API keys during the build:
ValueError: No authentication credentials found. Please set RUNPOD_AI_API_KEY
This is expected in a development environment and won't affect the documentation quality. The API key is only required for running the actual SDK.
If you encounter import-related warnings, ensure you have:
- Installed the package in development mode:
pip install -e .. - Installed all required dependencies:
pip install -r requirements.txt
Warnings about title underlines being too short are formatting issues. Ensure your RST files use consistent title decoration:
Section Title
============
Subsection Title
---------------
Sub-subsection Title
~~~~~~~~~~~~~~~~~~~- Create a new
.rstfile in the appropriate directory undersource/ - Add the file to the relevant
toctreedirective inindex.rstor parent page - Use proper RST syntax for headings, code blocks, and cross-references
- Use Google-style docstrings in Python code
- Keep line length under 100 characters
- Use proper RST directives for:
- Code examples:
.. code-block:: python - Notes and warnings:
.. note::,.. warning:: - Cross-references:
:ref:,:class:,:meth:
- Code examples:
For production builds:
- Clean previous builds:
make clean - Run spell check:
make spelling - Build HTML:
make html - Check for broken links:
make linkcheck
- Keep dependencies up to date in
requirements.txt - Review and update code examples
- Verify cross-references and links
- Update version numbers in
conf.py
- Document significant changes in changelog
- Tag documentation versions to match SDK releases
- Keep main branch documentation in sync with latest stable release