Create documentation from python modules and other objects.
Latest release 20250426:
- module_doc: new doc_item inner function to format an item, now using a list instead of a heading - more compact and readable.
- module_doc: restore mangled command usage.
- module_doc: provide a short summary of every module top level name before the full docs.
Short summary:
is_dunder: Test whether a name is a dunder name (__foo__).module_doc: Fetch the docstrings from a module and assemble a MarkDown document.obj_docstring: Return a docstring forobjwhich has been passed throughstripped_dedent.
Module contents:
-
is_dunder(name): Test whether a name is a dunder name (__foo__). -
module_doc(module, *, sort_key=<function <lambda> at 0x10a7ec220>, filter_key=<function <lambda> at 0x10a7ec720>, method_names=None): Fetch the docstrings from a module and assemble a MarkDown document.Parameters:
module: the module or module name to inspectsort_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
-
obj_docstring(obj): Return a docstring forobjwhich has been passed throughstripped_dedent.This function uses
obj.__doc__if it is notNone, otherwisegetcomments(obj)if that is notNone, otherwise''. The chosen string is passed throughstripped_dedentbefore return.
Release Log
Release 20250426:
- module_doc: new doc_item inner function to format an item, now using a list instead of a heading - more compact and readable.
- module_doc: restore mangled command usage.
- module_doc: provide a short summary of every module top level name before the full docs.
Release 20241007:
- module_doc: for subclasses of cs.fsm.FSM embed an SVG state transition diagram.
- module_doc: put HTML named anchors on the headings.
- module_doc: use BaseCommand.extract_usage() with BaseCOmmand subclasses.
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 20250426
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cs_py_doc-20250426.tar.gz | 4.6 kB | Without provenance | Details for cs_py_doc-20250426.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cs_py_doc-20250426-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for cs_py_doc-20250426-py2.py3-none-any.whl |
Total release size: 9.9 kB
Release files / cs_py_doc-20250426.tar.gz
| Download URL | cs_py_doc-20250426.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c02fa66690d5470b2226f87d2a89e02dcd369264703c33b6128b92a83079635
|
|
BLAKE2b-256 checksum How to use checksums |
af6878454c8d6362dadf59274043c3c526bb1e6610770733008cb20b4b549bf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / cs_py_doc-20250426-py2.py3-none-any.whl
| Download URL | cs_py_doc-20250426-py2.py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
61aadc9b380d3d12d79688391cae6ced672b51876488c23f6af5ff44573753ae
|
|
BLAKE2b-256 checksum How to use checksums |
ed444479a967196677dbd8bfe94bc4d9a2a1078d9d5460a8a2cb48e06c8c7f04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for cs-py-doc 20250426
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.