general-purpose programming language
Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically type-checked and garbage-collected. It supports multiple programming paradigms, including structured … Wikipedia
🌐
Readthedocs
pygithub.readthedocs.io › en › latest › introduction.html
Introduction — PyGithub 0.1.dev1+g24305f6d6 documentation
https://github.com/gomesfernanda/some-github-metrics - Python functions for relevant metrics on GitHub repositories
🌐
GitHub
github.com › python › docs-community
GitHub - python/docs-community: Community management for documentation contributors and the Docs Workgroup
Documentation Community Group (Working Group created in 2021 by the Python Steering Council) Referred to as the Documentation Community or docs-community Repo: python/docs-community ...
Starred by 52 users
Forked by 27 users
Languages   Makefile 100.0% | Makefile 100.0%
🌐
GitHub
github.com › icgood › continuous-docs
GitHub - icgood/continuous-docs: Tutorial and example package for continuous documentation generation in Python.
Tutorial and example package for continuous documentation generation in Python. - icgood/continuous-docs
Starred by 306 users
Forked by 12 users
Languages   Python 100.0% | Python 100.0%
🌐
GitHub
github.com › GoogleCloudPlatform › python-docs-samples › blob › main › AUTHORING_GUIDE.md
python-docs-samples/AUTHORING_GUIDE.md at main · GoogleCloudPlatform/python-docs-samples
Flask==1.1.1 PyMySQL==0.9.3 git+https://github.com/googleapis/python-firestore.git@ee518b741eb5d7167393c23baa1e29ace861b253 · Sample code may be integrated into Google Cloud Documentation through the use of region tags, which are comments added to the source code to identify code blocks that correspond to specific topics covered in the documentation. For example, see this sample — the region tags are the comments that begin with [START or [END.
Author   GoogleCloudPlatform
🌐
GitHub
github.com › GoogleCloudPlatform › python-docs-samples
GitHub - GoogleCloudPlatform/python-docs-samples: Code samples used on cloud.google.com · GitHub
3 weeks ago - Python samples for Google Cloud Platform products.
Starred by 8K users
Forked by 6.7K users
Languages   Jupyter Notebook 84.0% | Python 15.0% | JavaScript 0.7% | HTML 0.1% | Shell 0.1% | Dockerfile 0.1%
🌐
GitHub
github.com › python
Python · GitHub
python/python-docs-pt-br’s past year of commit activity · Python 154 CC0-1.0 40 12 (3 issues need help) 4 Updated · Mar 15, 2026 · python-docs-zh-tw Public · Traditional Chinese (zh-tw) translation of the Python Documentation · python/python-docs-zh-tw’s past year of commit activity ·
🌐
GitHub
github.com › PyGithub › PyGithub
GitHub - PyGithub/PyGithub: Typed interactions with the GitHub API v3 · GitHub
Typed interactions with the GitHub API v3. Contribute to PyGithub/PyGithub development by creating an account on GitHub.
Starred by 7.7K users
Forked by 1.9K users
Languages   Python 99.6% | Shell 0.4%
🌐
GitHub
github.com › topics › python-documentation
python-documentation · GitHub Topics · GitHub
python documentation mkdocs autodoc python-documentation mkdocstrings mkdocstrings-handler ... PythonSkills is a curated collection of practical Python scripts and examples, designed to showcase and teach various core programming concepts, tools, ...
Find elsewhere
🌐
PyPI
pypi.org › project › PyGithub
PyGithub · PyPI
from github import Github # ... a Github instance: # Public Web Github g = Github(auth=auth) # Github Enterprise with custom hostname g = Github(base_url="https://{hostname}/api/v3", auth=auth) # Then play with your Github ...
      » pip install PyGithub
    
Published   Sep 02, 2025
Version   2.8.1
🌐
GitHub
github.com › python › docsbuild-scripts
GitHub - python/docsbuild-scripts: scripts for building documentation on docs.python.org
ssh docs.nyc1.psf.io sudo su --shell=/bin/bash docsbuild screen -DUR # Rejoin screen session if it exists, otherwise create a new one /srv/docsbuild/venv/bin/python /srv/docsbuild/scripts/build_docs.py --force --branches 3.11
Starred by 80 users
Forked by 66 users
Languages   Python 83.3% | JavaScript 9.1% | HTML 7.6% | Python 83.3% | JavaScript 9.1% | HTML 7.6%
🌐
GitHub
docs.github.com › actions › guides › building-and-testing-python
Building and testing Python - GitHub Docs
For more information, see using setup-python with a self-hosted runner in the setup-python README. GitHub supports semantic versioning syntax. For more information, see Using semantic versioning and the Semantic versioning specification. The following example uses a matrix for the job to set up multiple Python versions.
🌐
GitHub
github.com › topics › python-docs
python-docs · GitHub Topics · GitHub
Replacing tags in a doc file (preservation of document text formatting) using the python-docs library.
🌐
GitHub
github.com › realpython › python-guide › blob › master › docs › writing › documentation.rst
python-guide/docs/writing/documentation.rst at master · realpython/python-guide
Python best practices guidebook, written for humans. - python-guide/docs/writing/documentation.rst at master · realpython/python-guide
Author   realpython
🌐
GitHub
github.com › Azure-Samples › python-docs-hello-world
GitHub - Azure-Samples/python-docs-hello-world: A simple python application for docs
A simple python application for docs. Contribute to Azure-Samples/python-docs-hello-world development by creating an account on GitHub.
Starred by 137 users
Forked by 3K users
Languages   Python 100.0% | Python 100.0%
Top answer
1 of 5
39

The other answers are great. But I thought I (the OP) ought to share what I do these days (a year or two after the question).

I use Sphinx and its Markdown extension. Do the following:

TL;DR: See Gist snippet.

Sphinx-markdown-builder

You need sphinx-markdown-builder python module.

 pip install sphinx sphinx-markdown-builder;

Run Sphinx

Not the autodoc, the apidoc!

sphinx-apidoc -o Sphinx-docs . sphinx-apidoc --full -A 'Matteo Ferla'; cd Sphinx-docs;

Configuration

Fix the conf.py file, by following the following or just lazily copy paste the echo command below.

Manual

First uncomment the lines. These are otherwise commented out.

import os
import sys
sys.path.insert(0, os.path.abspath('../'))

Note the change to ../

One weirdness is that the magic methods get ignored. To override this, add this anywhere:

def skip(app, what, name, obj, would_skip, options):
    if name in ( '__init__',):
        return False
    return would_skip
def setup(app):
    app.connect('autodoc-skip-member', skip)

A thing to note: The docstrings ought to be written in restructuredtext (RST). If they are in Markdown, you need to add a mod - see this. The two are similar, but different. For example, a single backquote is required for <code> in Markdown, while two are for RST. If in doubt, several blog posts discuss the merits of RST documentation over Markdown.

Typehinting

RST typehints (:type variable: List) are obsolete as proper typehinting def foo(variable: Optional[List[int]]=None) -> Dict[str,int]: has been introduced since 3.6. To make these work:

 pip install sphinx-autodoc-typehints

And add 'sphinx_autodoc_typehints' at the end of the extensions list. Note the package has hyphens while the module has underscores.

TL;DR

Copy paste this:

echo " import os
import sys
sys.path.insert(0,os.path.abspath('../'))
def skip(app, what, name, obj,would_skip, options):
    if name in ( '__init__',):
        return False
    return would_skip
def setup(app):
    app.connect('autodoc-skip-member', skip)
extensions.append('sphinx_autodoc_typehints')
 " >> conf.py;

Showtime

Then it is showtime.

make markdown;

Copy the files and clean however you fancy.

mv _build/markdown/* ../; rm -r Sphinx-docs;

Repeat Apidoc for new files

It should be noted that when new files are added, the apidoc command needs to be repeated. Nevertheless, I highly recommend generating documentation midway as I often realise I am doing something wrong when I see the docs.

But briefly, apidoc will add for each file a automodule command, so this could be added manually or even expanded:

.. automodule:: my_module
   :members:
   :inherited-members:
   :undoc-members:
   :show-inheritance:

There's also the commands autoclass, autofunction, autoexception, for specific cases. In the case of autoclass if the class inherits many base classes in separate files to rightfully keep filesizes under 250 lines, the property :inherited-members: is a nice addition to this —thus avoiding having to describe the private base classes.

Read the docs: the common way

It should be said that there's a trend to not have documentation in GitHub but in Read the docs. My guess is because:

  • avoids this docstrings-to-markdown business
  • some users get confused by GitHub
  • looks nicer
  • other do it

Despite this, it requires some set up due to the module requirements. In another SO post is a long list of pitfalls and tricks —briefly IMO users, such as myself, make three mistakes:

  1. missing modules or the target module
  2. forget to hard refresh the browser
  3. enabling the sphinx.ext.autodoc extension

However, if one has written markdown documentation in GitHub these can be imported too. Formerly, the m2r2 (a fix of the deprecated m2r) was a good solution, but the divergence of its dependency mistune, which would require it to be frozen at version 0.8.4 as opposed to being at 2.0.0, which breaks other sphinx modules, therefore a new split works best and better: sphinx-mdinclude. This is pip installed as sphinx-mdinclude but included as sphinx_mdinclude and allows md files to be read alongside rst files. So a simple workaround in the docs/source/config.py file is to copy the files from the project root to the folder of config.py One issue is that links may need to be checked, especially if files moved around or are relative to the base URL (slash prefixed), eg. Foo.

2 of 5
9

I've found pydoc-markdown quite easy to use. The first command will install the library and the second one will create a README from your module named MY_MODULE:

pip install pydoc-markdown
pydoc-markdown -m MY_MODULE -I $(pwd) > README.md
🌐
GitHub
github.com › topics › python-examples
python-examples · GitHub Topics · GitHub
A complete, folder-based guide to the Python language, from basics to advanced concepts, explained through clear, runnable code examples. python best-practices beginner-friendly python-tutorial learn-python python-examples example-based
🌐
Readthedocs
gitpython.readthedocs.io
GitPython Documentation — GitPython 3.1.46 documentation
© Copyright Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel
🌐
Medium
medium.com › @ariassbustojonathan › automate-python-documentation-with-sphinx-for-github-3dda2ca690ec
Automate Python Documentation with Sphinx for GitHub | by Jonathan Arias Busto | Medium
August 2, 2024 - As mentioned on the previous section Setting Up Sphinx, a folder named .github/workflows/ was created. Here we will create a file named documentation.yml, which looks like this: name: documentation on: [push, pull_request, workflow_dispatch] permissions: contents: write jobs: docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - name: Install dependencies run: | pip install sphinx sphinx_rtd_theme myst_parser - name: Sphinx build run: | cd docs sphinx-apidoc -o ./source ../src -f make html - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} with: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/build/html force_orphan: true
🌐
GitHub
github.com › python › python-docs-theme
GitHub - python/python-docs-theme: Sphinx theme for Python documentation
November 3, 2021 - Sphinx theme for Python documentation. Contribute to python/python-docs-theme development by creating an account on GitHub.
Starred by 83 users
Forked by 73 users
Languages   CSS 48.1% | HTML 20.3% | JavaScript 15.8% | Python 13.5% | Makefile 2.3% | CSS 48.1% | HTML 20.3% | JavaScript 15.8% | Python 13.5% | Makefile 2.3%
🌐
Python Developer's Guide
devguide.python.org
Python Developer’s Guide
git clone https://github.com/<your_username>/cpython cd cpython ... See also more detailed instructions, how to install and build dependencies, and the platform-specific pages for Unix, macOS, and Windows.