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

python-getdoc

Simple function to get a python module’s doc recursively

License

Software licensed under MPL 2.0 license.

Installation

(Not yet on PyPi, clone the repo)

pip install getdoc

Development

To run all the tests: tox

Usage

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,
                    exclude_class=None,
                    exclude_function=None)
doc = get_function_doc(some_module.SomeClass.some_function,
                       exclude_function=None)

Changelog

0.1.0 (2016-11-17)

  • Alpha release on PyPI.

Project details


Release history Release notifications

This version
History Node

0.3.0

History Node

0.2.0

History Node

0.1.0

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