Main entry point for generating docs.

root_title A string. The main title for the project. Like "TensorFlow"
py_modules The python module to document.
base_dir String or tuple of strings. Directories that "Defined in" links are generated relative to. Modules outside one of these directories are not documented. No base_dir should be inside another.
code_url_prefix String or tuple of strings. The prefix to add to "Defined in" paths. These are zipped with base-dir, to set the defined_in path for each file. The defined in link for {base_dir}/path/to/file is set to {code_url_prefix}/path/to/file.
self_link_base A string. A URL prefix pre-pend to self-links to the generated docs pages. Optional, if no self_link_base is supplied, no self-link will be added.
search_hints Bool. Include metadata search hints at the top of each file.
site_path Path prefix in the "_toc.yaml"
private_map DEPRECATED. Use api_generator.doc_controls, or pass a filter to the callbacks argument. A {"": ["names"]} dictionary. Specific aliases that should not be shown in the resulting docs.
visitor_cls An option to override the default visitor class doc_generator_visitor.DocGeneratorVisitor.
api_cache Bool. Generate an api_cache file. This is used to easily add api links for backticked symbols (like tf.add) in other docs.
callbacks Additional callbacks passed to traverse. Executed between the PublicApiFilter and the accumulator (DocGeneratorVisitor). The primary use case for these is to filter the list of children (see: public_api.ApiFilter for the required signature)
yaml_toc Bool which decides whether to generate _toc.yaml file or not.
gen_redirects Bool which decides whether to generate _redirects.yaml file or not.
gen_report If True, a report for the library is generated by linting the docstrings of its public API symbols.
extra_docs To add docs for a particular object instance set it's doc attribute. For some classes (list, tuple, etc) doc is not writable. Pass those docs like: extra_docs={id(obj): "docs"}
page_builder_classes An optional dict of {ObjectType:Type[PageInfo]} for overriding the default page builder classes.



View source

Build all the docs.

This produces python api docs:

  • generated from py_module.
  • written to '{output_dir}/api_docs/python/'

output_dir Where to write the resulting docs.


View source


View source


View source


View source

Walks the module contents, returns an index of all visited objects.

An instance of parser_config.ParserConfig.