Function reference
Preparation Functions
These functions fetch and analyze Python objects, including parsing docstrings. They prepare a basic representation of your doc site that can be rendered and built.
Auto | Configure a python object to document (e.g. module, class, function, attribute). |
blueprint | Convert a configuration element to something that is ready to render. |
collect | Return all pages and items in a layout. |
get_object | Fetch a griffe object. |
preview | Print a friendly representation of a griffe object (e.g. function, docstring) |
Docstring Renderers
Renderers convert parsed docstrings into a target format, like markdown.
MdRenderer | Render docstrings to markdown. |
MdRenderer.render | Return a string representation of an object, or layout element. |
MdRenderer.render_annotation | Special hook for rendering a type annotation. |
MdRenderer.render_header | Render the header of a docstring, including any anchors. |
MdRenderer.signature | Return a string representation of an object’s signature. |
MdRenderer.summarize | Produce a summary table. |
API Builders
Builders are responsible for building documentation. They tie all the pieces of quartodoc together, and can be defined in your _quarto.yml config.
Builder | Base class for building API docs. |
Builder.from_quarto_config | Construct a Builder from a configuration object (or yaml file). |
Builder.build | Build index page, sphinx inventory, and individual doc pages. |
Builder.write_index | Write API index page. |
Builder.write_doc_pages | Write individual function documentation pages. |
Builder.write_sidebar | Write a yaml config file for API sidebar. |
Builder.create_inventory | Generate sphinx inventory object. |
Inventory links
Inventory files map a function’s name to its corresponding url in your docs. These functions allow you to create and transform inventory files.
create_inventory | Return a sphinx inventory file. |
convert_inventory | Convert a sphinx inventory file to json. |
Data models
Structural
Classes for specifying the broad structure your docs.
layout.Layout | The layout of an API doc, which may include many pages. |
layout.Section | A section of content on the reference index page. |
layout.Page | A page of documentation. |
layout.SectionElement | Entry in the sections list. |
layout.ContentElement | Entry in the contents list. |
Docable
Classes representing python objects to be rendered.
layout.Doc | A python object to be documented. |
layout.DocFunction | Document a python function. |
layout.DocAttribute | Document a python attribute. |
layout.DocModule | Document a python module. |
layout.DocClass | Document a python class. |
layout.Link | A link to an object (e.g. a method that gets documented on a separate page). |
layout.Item | Information about a documented object, including a URI to its location. |
layout.ChoicesChildren | Options for how child members of a class or module should be documented. |
Docstring patches
Most of the classes for representing python objects live in griffe.dataclasses
or griffe.docstrings.dataclasses
. However, the quartodoc.ast
module has a number of custom classes to fill in support for some important docstring sections.
ast.DocstringSectionSeeAlso | |
ast.DocstringSectionNotes | |
ast.DocstringSectionWarnings | |
ast.ExampleCode | |
ast.ExampleText |