
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
markdown-doc
Advanced tools
This library generates Markdown documentation directly from Python code, utilizing Python type annotations.
__eq__) are published if they have a doc-string.Cross-references with Sphinx-style syntax are supported in module, class and function doc-strings:
@dataclass
class SampleClass:
"""
This class is extended by :class:`DerivedClass`.
This class implements :meth:`__lt__` and :meth:`SampleClass.__gt__`.
"""
The following Sphinx-style cross-references are recognized:
:mod: for a module:class: for a regular class:exc: for an exception class:deco: for a decorator function:func: for a function defined at the module level:meth: for a method of a classClass member variable and data-class field descriptions are defined with :param ...::
@dataclass
class DerivedClass(SampleClass):
"""
This data-class derives from another base class.
:param union: A union of several types.
:param json: A complex type with type substitution.
:param schema: A complex type without type substitution.
"""
union: SimpleType
json: JsonType
schema: Schema
Enumeration member description follows the member value assignment:
class EnumType(enum.Enum):
enabled = "enabled"
"Documents the enumeration member `enabled`."
disabled = "disabled"
"Documents the enumeration member `disabled`."
from markdown_doc.generator import MarkdownGenerator
MarkdownGenerator([module1, module2, module3]).generate(out_dir)
Pass an object of MarkdownOptions to configure behavior:
MarkdownGenerator(
[module1, module2, module3],
options=MarkdownOptions(
anchor_style=MarkdownAnchorStyle.GITBOOK,
partition_strategy=PartitionStrategy.SINGLE,
include_private=False,
stdlib_links=True,
),
).generate(out_dir)
$ python3 -m markdown_doc --help
usage: markdown_doc [-h] [-d [DIRECTORY ...]] [-m [MODULE ...]] [-r ROOT_DIR] [-o OUT_DIR] [--anchor-style {GitBook,GitHub}] [--partition {single,by_kind}]
Generates Markdown documentation from Python code
options:
-h, --help show this help message and exit
-d [DIRECTORY ...], --directory [DIRECTORY ...]
folder(s) to recurse into when looking for modules
-m [MODULE ...], --module [MODULE ...]
qualified names(s) of Python module(s) to scan
-r ROOT_DIR, --root-dir ROOT_DIR
path to act as root for converting directory paths into qualified module names (default: working directory)
-o OUT_DIR, --out-dir OUT_DIR
output directory (default: 'docs' in working directory)
--anchor-style {GitBook,GitHub}
output format for generating anchors in headings
--partition {single,by_kind}
how to split module contents across Markdown files
In order to reduce added complexity, this library does not use the Sphinx framework with autodoc.
FAQs
Generate Markdown documentation from Python code
We found that markdown-doc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.