DocWalker
A class that walks a module structure, generating .md files for every class inside it as well as for global functions, and a Markdown index file.
Takes a set of objects & writers and walks through the objects, generating files on the way
Properties and Methods
__init__(self, objects, out=None, module_writer=None, class_writer=None, function_writer=None, object_writer=None, ignore_paths=None):
objects:Iterable[Any]the objects to write out
out:None | strthe directory in which to write the files (
Nonemeanssys.stdout)module_writer:typethe class to used to write module Markdown (
NonemeansModuleWriter)class_writer:typethe class to used to write class Markdown(
NonemeansClassWriter)function_writer:typethe class to used to write function Markdown (
NonemeansFunctionWriter)object_writer:typethe class to used to write object Markdown (
NonemeansObjectWriter)ignore_paths:None | Iterable[str]a set of paths not to write (passed to the objects)
write_object(self, o, written=None):
Writes a single object to file
o:Anythe object we want to write
written:None | dicta caching dict of objects to break cyclic reference loops
:returns:None | strthe written file
write_docs(self):
Walks through the objects supplied and writes them & their children to file
:returns:list[str]written files
Examples
Edit Examples or
Create New Examples
Edit Template or
Create New Template
Edit Docstrings