Skip to main content

Create documentation from python modules and other objects.

Latest release 20240709: module_doc: do not insert a BaseCommand usage into the docs, the BaseCommand.init_subclass will be doing that for us.

Function is_dunder(name)

Test whether a name is a dunder name (__foo__).

Function module_doc(module, *, sort_key=<function <lambda> at 0x104643600>, filter_key=<function <lambda> at 0x104643ba0>, method_names=None)

Fetch the docstrings from a module and assemble a MarkDown document.

Parameters:

  • module: the module or module name to inspect
  • sort_key: optional key for sorting names in the documentation; default: name
  • filter_key`: optional test for a key used to select or reject keys to appear in the documentation
  • method_names: optional list of method names to document; the default is to document __init__, then CONSTANTS, the dunders, then other public names

Function obj_docstring(obj)

Return a docstring for obj which has been passed through stripped_dedent.

This function uses obj.__doc__ if it is not None, otherwise getcomments(obj) if that is not None, otherwise ''. The chosen string is passed through stripped_dedent before return.

Release Log

Release 20240709: module_doc: do not insert a BaseCommand usage into the docs, the BaseCommand.init_subclass will be doing that for us.

Release 20240630.1: module_doc: build the usage message from an instance of the baseCommand, needed since the last cs.cmdutils release.

Release 20240630: module_doc: insert the class usage message for subclasses of BaseCommand.

Release 20240422: module_doc: only list things in all if provided.

Release 20240412: module_doc: classes: MRO: suppress classes which are not immediate superclasses.

Release 20220311: module_doc: class members no longer rendered as headings, too verbose.

Release 20210306: Drop noise leaked into output.

Release 20210123:

  • module_doc: include properties/descriptors.
  • DISTINFO: this is not Python 2 compatible, drop tag.

Release 20200718:

  • New is_dunder(name) function to test whether name is a dunder name.
  • module_doc: new method_names parameter to report only specific attributes from a class - default is all public names and most dunder methods - things without docs are not reported.
  • Assorted small changes.

Release 20200521: Initial PyPI release.

Metadata

Release files for cs-py-doc 20240709

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cs-py-doc 20240709
File Size Uploaded
cs_py_doc-20240709.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cs-py-doc 20240709
File Interpreter ABI Platform
cs.py.doc-20240709-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / cs_py_doc-20240709.tar.gz

Download URL cs_py_doc-20240709.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
75dcf0f8833b103c6b096b4490e3cc3cbe46578104bb98de7117cf6672cfe05b
BLAKE2b-256 checksum
How to use checksums
67de8a944496eaeb4aeb8afd27335cde6dd709c63a8c0556868110ca88fdd486
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.0

Release files / cs.py.doc-20240709-py3-none-any.whl

Download URL cs.py.doc-20240709-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
849380a39809237f8706bb87b1355d526f5128e5737152d06facc0cd1c48f95b
BLAKE2b-256 checksum
How to use checksums
5245c79799424ee388639d25dc926b9dde1dffbffa1b6706132924ff0a5050a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.0
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page