robot.libdocpkg package
Implements the Libdoc tool.
The public Libdoc API is exposed via the robot.libdoc module.
Submodules
robot.libdocpkg.builder module
- robot.libdocpkg.builder.LibraryDocumentation(library_or_resource, name=None, version=None, doc_format=None)[source]
Generate keyword documentation for the given library, resource or suite file.
- Parameters:
library_or_resource – Name or path of the library, or path of a resource or a suite file.
name – Set name with the given value.
version – Set version to the given value.
doc_format – Set documentation format to the given value.
- Returns:
LibraryDocinstance.
This factory method is the recommended API to generate keyword documentation programmatically. It should be imported via the
robot.libdocmodule.Example:
from robot.libdoc import LibraryDocumentation lib = LibraryDocumentation('OperatingSystem') print(lib.name, lib.version) for kw in lib.keywords: print(kw.name)
- class robot.libdocpkg.builder.DocumentationBuilder[source]
Bases:
objectKeyword documentation builder.
This is not part of Libdoc’s public API. Use
LibraryDocumentation()instead.
robot.libdocpkg.consoleviewer module
robot.libdocpkg.datatypes module
- class robot.libdocpkg.datatypes.TypeDoc(type, name, doc, accepts=(), usages=None, members=None, items=None)[source]
Bases:
Sortable- ENUM = 'Enum'
- TYPED_DICT = 'TypedDict'
- CUSTOM = 'Custom'
- STANDARD = 'Standard'
robot.libdocpkg.htmlutils module
- class robot.libdocpkg.htmlutils.DocFormatter(keywords: list[KeywordDoc], introduction: str, doc_format: Literal['ROBOT', 'MARKDOWN', 'HTML', 'TEXT', 'REST'] = 'ROBOT')[source]
Bases:
object
- class robot.libdocpkg.htmlutils.DocToHtml(doc_format: Literal['ROBOT', 'MARKDOWN', 'HTML', 'TEXT', 'REST'], targets: Dict[str, tuple[str, str]] | None = None)[source]
Bases:
object
robot.libdocpkg.htmlwriter module
- class robot.libdocpkg.htmlwriter.LibdocModelWriter(output, libdoc, theme=None, lang=None)[source]
Bases:
ModelWriter
robot.libdocpkg.jsonbuilder module
robot.libdocpkg.jsonwriter module
robot.libdocpkg.languages module
robot.libdocpkg.markdownformatter module
- class robot.libdocpkg.markdownformatter.LibdocMarkdownWriter[source]
Bases:
objectWrites the full library/resource documentation as a single Markdown file.
Formatting is the same that is used when viewing documentation on console. Actual documentation is got directly from the library/resource, so the result is proper Markdown only if the library uses Markdown as its documentation format.
- class robot.libdocpkg.markdownformatter.MarkdownFormatter(libdoc: LibraryDoc)[source]
Bases:
object
- class robot.libdocpkg.markdownformatter.KeywordFormatter(init=False)[source]
Bases:
object- format(keyword: KeywordDoc) str[source]
robot.libdocpkg.model module
- class robot.libdocpkg.model.LibraryDoc(name: str = '', doc: str = '', version: str = '', type: str = 'LIBRARY', scope: str = 'TEST', doc_format: Literal['ROBOT', 'MARKDOWN', 'HTML', 'TEXT', 'REST'] = 'ROBOT', source: str | Path | None = None, lineno: int | None = None)[source]
Bases:
objectDocumentation for a library, a resource file or a suite file.
- doc_format
- inits
Initializer docs as
KeywordDocinstances.
- keywords
Keyword docs as
KeywordDocinstances.
- type_docs
- property all_tags
- class robot.libdocpkg.model.KeywordDoc(name: str = '', args: ArgumentSpec | None = None, doc: str = '', short_doc: str = '', tags: Sequence[str] = (), private: bool = False, deprecated: bool = False, source: str | Path | None = None, lineno: int | None = None, parent: LibraryDoc | None = None)[source]
Bases:
SortableDocumentation for a single keyword or an initializer.
- property short_doc
robot.libdocpkg.output module
robot.libdocpkg.robotbuilder module
- class robot.libdocpkg.robotbuilder.ResourceDocBuilder(doc_format)[source]
Bases:
object- type = 'RESOURCE'
- class robot.libdocpkg.robotbuilder.SuiteDocBuilder(doc_format)[source]
Bases:
ResourceDocBuilder- type = 'SUITE'