API Reference¶
Sphinx extension to display a selection of highlights from a Python library.
Classes:
|
Provides the |
Functions:
|
Copy asset files to the output. |
|
Format an |
|
Format the signature of the given object, for insertion into the highlight panel. |
|
Returns four random elements from |
|
Setup |
-
class
SphinxHighlightsDirective
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
SphinxDirective
Provides the
api-highlights
directive.Methods:
delimited_get
(option, default)Returns the value of the option with the given name, splitting the input at commas, semicolons and spaces.
run
()Create the highlights node.
Generate generic reStructuredText output.
run_html
()Generate output for
HTML
builders.
-
format_parameter
(param)[source]¶ Format an
inspect.Parameter
, for insertion into the highlight panel.
-
format_signature
(obj)[source]¶ Format the signature of the given object, for insertion into the highlight panel.
- Parameters
obj (
Union
[type
,FunctionType
])- Return type
- Returns
A list of reStructuredText lines.
-
setup
(app)[source]¶ Setup
sphinx_highlights
.- Parameters
app (
Sphinx
) – The Sphinx application.- Return type