Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Simple function to get a python module's doc recursively

Project Description


Simple function to get a python module’s doc recursively


Software licensed under MPL 2.0 license.


(Not yet on PyPi, clone the repo)

pip install getdoc


To run all the tests: tox


import some_module
from getdoc import get_module_doc

doc = get_module_doc(some_module)
# The result is a nested list of tuple: (type, name, doc),
# type being 'function', 'class', or 'module'.

# You can exclude modules, classes or functions with exclude options.
# Their content are used as prefixes:
doc = get_module_doc(some_module,
                     exclude_module=('django', ),
                     exclude_class=('DoesNotExist', 'MultipleObjectsReturned'),
                     exclude_function=('_', ))

# You can get doc for just a class (and its contents), or just a function.
from getdoc import get_class_doc, get_function_doc

doc = get_class_doc(some_module.SomeClass,
doc = get_function_doc(some_module.SomeClass.some_function,


0.1.0 (2016-11-17)

  • Alpha release on PyPI.
Release History

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
getdoc-0.3.0-py2.py3-none-any.whl (5.3 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Nov 18, 2016
getdoc-0.3.0.tar.gz (15.0 kB) Copy SHA256 Checksum SHA256 Source Nov 18, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting