Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.


Folders and files

Last commit message
Last commit date

Latest commit



73 Commits

Repository files navigation

Generate Documentation Automatically

Documentation Status


Build Status


This is a Python package for automatically building the documentation pages to document a given Python package using Sphinx. gendocs allows users to keep all of their documentation directly within their packages as pages are generated directly from the docstrings in the code!


Want to see examples? Check out one of the following projects which use gendocs:

  • PVGeo: A Python package for visualizing geophysical data in VTK and ParaView
  • ESPA Tools: A Python package for simple loading of Landsat imagery as NumPy arrays

Get Started

Install gendocs from PyPI:

$ pip install gendocs


Want to easily create a new project that will build its own documentation? Try the gendocs Cookiecutter which will prompt you for your new project's details and create all the needed file structures for your new, automatically documented Python package.

To create a new project, make sure you have Cookiecutter installed in your virtual environment:

$ pip install cookiecutter

Now you can use our Cookiecutter template to create a new project ready for gendocs by executing the following command and following the prompts:

$ cookiecutter

That's it! Now you have a new Python project ready for automatic documentation and deployment.


Already have a Python package in need of automatic documentation? Follow these steps.

This generator is built for Sphinx (RST) documentation. To document your package, setup sphinx and a then add the following somewhere near the top of your

# Import the package to document:
import wonderfulpackage

# Automatically generate documentation pages
from gendocs import Generator

That's it! That code block above is all you need to do to document your package(s) thoroughly. Now you can build the Sphinx documentation, and all docs pages will be automatically generated.

Remove the Edit on GitHub Button

Be sure to remove the Edit on GitHub link from your project by following these steps.

Make Your Own Homepage

Note that you can also set up a base index file in your project for the Generator to append if you'd like to include a brief overview of the package. We simply pass the filename of our README to the DocumentPackages method.

Let People Know

If your project generates documentation automatically, please add a badge to your project to let people know! We hope that these badges will stir curiosity, involvement, and community contributions to the gendocs package.


[![Documentation Built by gendocs](](

RST / Sphinx:

.. image::
   :alt: Documentation Built by gendocs


Check out gendocs of GitHub to Contribute and make automatic documentation even better!


Automatically build Sphinx documentation pages for a given Python package







No packages published