Module: tfdocs.parser

Turn Python docstrings into Markdown for TensorFlow documentation.


class DocstringInfo: DocstringInfo(brief, docstring_parts, compatibility)

class FileLocation: This class indicates that the object is defined in a regular file.

class Metadata: A class for building a page's Metadata block.

class TitleBlock: A class to parse title blocks (like Args:) and convert them to markdown.


documentation_path(...): Returns the file path for the documentation for the given API symbol.

generate_global_index(...): Given a dict of full names to python objects, generate an index page.

get_defined_in(...): Returns a description of where the passed in python object was defined.


is_class_attr(...): Check if the object's parent is a class.

parse_md_docstring(...): Parse the object's docstring and return a DocstringInfo.

ITEMS_TEMPLATE '<tr>\n<td>\n{name}{anchor}\n</td>\n<td>\n{description}\n</td>\n</tr>'
TABLE_TEMPLATE ('\n' '<!-- Tabular view -->\n' ' <table class="responsive fixed orange">\n' '<colgroup><col width="214px"><col></colgroup>\n' '<tr><th colspan="2">{title}</th></tr>\n' '{text}\n' '{items}\n' '</table>\n')
TEXT_TEMPLATE '<tr class="alt">\n<td colspan="2">\n{text}\n</td>\n</tr>'