Utility functions for Sphinx.
Unknown Field: copyright | |
Copyright 2007-2022 by the Sphinx team, see AUTHORS. | |
Unknown Field: license | |
BSD, see LICENSE for details. |
Module | docutils |
sphinx.util.docutils ~~~~~~~~~~~~~~~~~~~~ |
Module | logging |
sphinx.util.logging ~~~~~~~~~~~~~~~~~~~ |
Module | build_phase |
sphinx.util.build_phase ~~~~~~~~~~~~~~~~~~~~~~~ |
Module | cfamily |
sphinx.util.cfamily ~~~~~~~~~~~~~~~~~~~ |
Module | compat |
sphinx.util.compat ~~~~~~~~~~~~~~~~~~ |
Module | console |
sphinx.util.console ~~~~~~~~~~~~~~~~~~~ |
Module | docfields |
sphinx.util.docfields ~~~~~~~~~~~~~~~~~~~~~ |
Module | docstrings |
sphinx.util.docstrings ~~~~~~~~~~~~~~~~~~~~~~ |
Module | fileutil |
sphinx.util.fileutil ~~~~~~~~~~~~~~~~~~~~ |
Module | i18n |
sphinx.util.i18n ~~~~~~~~~~~~~~~~ |
Module | images |
sphinx.util.images ~~~~~~~~~~~~~~~~~~ |
Module | inspect |
sphinx.util.inspect ~~~~~~~~~~~~~~~~~~~ |
Module | inventory |
sphinx.util.inventory ~~~~~~~~~~~~~~~~~~~~~ |
Module | jsdump |
sphinx.util.jsdump ~~~~~~~~~~~~~~~~~~ |
Module | matching |
sphinx.util.matching ~~~~~~~~~~~~~~~~~~~~ |
Module | math |
sphinx.util.math ~~~~~~~~~~~~~~~~ |
Module | nodes |
sphinx.util.nodes ~~~~~~~~~~~~~~~~~ |
Module | osutil |
sphinx.util.osutil ~~~~~~~~~~~~~~~~~~ |
Module | parallel |
sphinx.util.parallel ~~~~~~~~~~~~~~~~~~~~ |
Module | png |
sphinx.util.png ~~~~~~~~~~~~~~~ |
Module | pycompat |
sphinx.util.pycompat ~~~~~~~~~~~~~~~~~~~~ |
Module | requests |
sphinx.util.requests ~~~~~~~~~~~~~~~~~~~~ |
Module | rst |
sphinx.util.rst ~~~~~~~~~~~~~~~ |
Module | smartypants |
sphinx.util.smartypants ~~~~~~~~~~~~~~~~~~~~~~~ |
Package | stemmer |
sphinx.util.stemmer ~~~~~~~~~~~~~~~~~~~ |
Module | tags |
sphinx.util.tags ~~~~~~~~~~~~~~~~ |
Module | template |
sphinx.util.template ~~~~~~~~~~~~~~~~~~~~ |
Module | texescape |
sphinx.util.texescape ~~~~~~~~~~~~~~~~~~~~~ |
Module | typing |
sphinx.util.typing ~~~~~~~~~~~~~~~~~~ |
From __init__.py
:
Variable | logger |
Undocumented |
Variable | url_re |
Undocumented |
Variable | ws_re |
Undocumented |
Class | DownloadFiles |
A special dictionary for download files. |
Class | FilenameUniqDict |
A dictionary that automatically generates unique names for its keys, interpreted as filenames, and keeps track of a set of docnames they appear in. Used for images and downloadable files in the environment. |
Class | progress_message |
Undocumented |
Class | SkipProgressMessage |
Undocumented |
Class | Tee |
File-like object writing to two streams. |
Class | UnicodeDecodeErrorHandler |
Custom error handler for open() that warns and replaces. |
Function | display_chunk |
Undocumented |
Function | docname_join |
Undocumented |
Function | encode_uri |
Undocumented |
Function | epoch_to_rfc1123 |
Convert datetime format epoch to RFC1123. |
Function | force_decode |
Forcibly get a unicode string out of a bytestring. |
Function | format_exception_cut_frames |
Format an exception with traceback, but only the last x frames. |
Function | get_filetype |
Undocumented |
Function | get_full_modname |
Undocumented |
Function | get_matching_files |
Get all file names in a directory, recursively. |
Function | import_object |
Import python object by qualname. |
Function | isurl |
Check url is URL or not. |
Function | md5 |
Wrapper around hashlib.md5 |
Function | old_status_iterator |
Undocumented |
Function | parselinenos |
Parse a line number spec (such as "1,2,4-6") and return a list of wanted line numbers. |
Function | path_stabilize |
Normalize path separator and unicode string |
Function | rfc1123_to_epoch |
Undocumented |
Function | rpartition |
Similar to str.rpartition from 2.5, but doesn't return the separator. |
Function | save_traceback |
Save the current exception's traceback in a temporary file. |
Function | sha1 |
Wrapper around hashlib.sha1 |
Function | split_full_qualified_name |
Split full qualified name to a pair of modname and qualname. |
Function | split_index_msg |
Undocumented |
Function | split_into |
Split an index entry into a given number of parts at semicolons. |
Function | status_iterator |
Undocumented |
Function | xmlname_checker |
Undocumented |
Constant | _DEBUG_HEADER |
Undocumented |
Variable | _coding_re |
Undocumented |
Undocumented
Parameters | |
basedocname:str | Undocumented |
docname:str | Undocumented |
Returns | |
str | Undocumented |
Parameters | |
filepath:str | Undocumented |
Returns | |
str | Undocumented |
Get all file names in a directory, recursively.
Exclude files and dirs matching some matcher in exclude_matchers.
Parameters | |
dirname:str | Undocumented |
exclude_matchers:Tuple[ | Undocumented |
Returns | |
Iterable[ | Undocumented |
Undocumented
Parameters | |
source_suffix:Dict[ | Undocumented |
filename:str | Undocumented |
Returns | |
str | Undocumented |
Wrapper around hashlib.md5
Attempt call with 'usedforsecurity=False' if we get a ValueError, which happens when OpenSSL FIPS mode is enabled: ValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips
Wrapper around hashlib.sha1
Attempt call with 'usedforsecurity=False' if we get a ValueError
str
=
Undocumented
Value |
|
Parameters | |
app:Sphinx | Undocumented |
Returns | |
str | Undocumented |
Undocumented
Parameters | |
modname:str | Undocumented |
attribute:str | Undocumented |
Returns | |
str | Undocumented |
Parameters | |
spec:str | Undocumented |
total:int | Undocumented |
Returns | |
List[ | Undocumented |
Parameters | |
string:str | Undocumented |
encoding:str | Undocumented |
Returns | |
str | Undocumented |
Parameters | |
s:str | Undocumented |
t:str | Undocumented |
Returns | |
Tuple[ | Undocumented |
Parameters | |
n:int | Undocumented |
type:str | Undocumented |
value:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
type:str | Undocumented |
value:str | Undocumented |
Returns | |
List[ | Undocumented |
Parameters | |
x:int | Undocumented |
Returns | |
str | Undocumented |
Parameters | |
objname:str | Undocumented |
source:str | Undocumented |
Returns | |
Any | Undocumented |
Split full qualified name to a pair of modname and qualname.
A qualname is an abbreviation for "Qualified name" introduced at PEP-3155 (https://www.python.org/dev/peps/pep-3155/). It is a dotted path name from the module top-level.
A "full" qualified name means a string containing both module name and qualified name.
Note
This function actually imports the module to check its existence. Therefore you need to mock 3rd party modules if needed before calling this function.
Parameters | |
name:str | Undocumented |
Returns | |
Tuple[ | Undocumented |
Undocumented
Parameters | |
iterable:Iterable | Undocumented |
summary:str | Undocumented |
color:str | Undocumented |
stringify_func:Callable[ | Undocumented |
Returns | |
Iterator | Undocumented |
Undocumented
Parameters | |
iterable:Iterable | Undocumented |
summary:str | Undocumented |
color:str | Undocumented |
length:int | Undocumented |
verbosity:int | Undocumented |
stringify_func:Callable[ | Undocumented |
Returns | |
Iterable | Undocumented |
Parameters | |
epoch:float | Undocumented |
Returns | |
str | Undocumented |