Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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.

Project details

Release history Release notifications

This version
History Node


History Node


History Node


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
getdoc-0.3.0-py2.py3-none-any.whl (5.3 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Nov 18, 2016
getdoc-0.3.0.tar.gz (15.0 kB) Copy SHA256 hash SHA256 Source None Nov 18, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page