| 1 |
# |
| 2 |
# Flask-Security documentation build configuration file, created by |
| 3 |
# sphinx-quickstart on Mon Mar 12 15:35:21 2012. |
| 4 |
# |
| 5 |
# This file is execfile()d with the current directory set to its containing |
| 6 |
# dir. |
| 7 |
# |
| 8 |
# Note that not all possible configuration values are present in this |
| 9 |
# autogenerated file. |
| 10 |
# |
| 11 |
# All configuration values have a default; values that are commented out |
| 12 |
# serve to show the default. |
| 13 |
|
| 14 |
import os |
| 15 |
import sys |
| 16 |
|
| 17 |
from pallets_sphinx_themes import ProjectLink |
| 18 |
from pallets_sphinx_themes import get_version |
| 19 |
|
| 20 |
# If extensions (or modules to document with autodoc) are in another directory, |
| 21 |
# add these directories to sys.path here. If the directory is relative to the |
| 22 |
# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 23 |
sys.path.insert(0, os.path.abspath("..")) |
| 24 |
|
| 25 |
# -- General configuration ----------------------------------------------- |
| 26 |
|
| 27 |
# If your documentation needs a minimal Sphinx version, state it here. |
| 28 |
# needs_sphinx = '1.0' |
| 29 |
|
| 30 |
# Add any Sphinx extension module names here, as strings. They can be |
| 31 |
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| 32 |
extensions = [ |
| 33 |
"pallets_sphinx_themes", |
| 34 |
"sphinx.ext.autodoc", |
| 35 |
"sphinx.ext.intersphinx", |
| 36 |
"sphinx.ext.autosectionlabel", |
| 37 |
"sphinx_issues", |
| 38 |
] |
| 39 |
|
| 40 |
# Add any paths that contain templates here, relative to this directory. |
| 41 |
templates_path = ["_templates"] |
| 42 |
|
| 43 |
# The suffix of source filenames. |
| 44 |
source_suffix = ".rst" |
| 45 |
|
| 46 |
# The encoding of source files. |
| 47 |
# source_encoding = 'utf-8-sig' |
| 48 |
|
| 49 |
# The master toctree document. |
| 50 |
master_doc = "index" |
| 51 |
|
| 52 |
# General information about the project. |
| 53 |
project = "Flask-Security" |
| 54 |
copyright = "2012-2026" |
| 55 |
author = "Matt Wright & Chris Wagner" |
| 56 |
|
| 57 |
# The version info for the project you're documenting, acts as replacement for |
| 58 |
# |version| and |release|, also used in various other places throughout the |
| 59 |
# built documents. |
| 60 |
# |
| 61 |
release, version = get_version("Flask-Security") |
| 62 |
|
| 63 |
# The language for content autogenerated by Sphinx. Refer to documentation |
| 64 |
# for a list of supported languages. |
| 65 |
# language = None |
| 66 |
|
| 67 |
# There are two options for replacing |today|: either, you set today to some |
| 68 |
# non-false value, then it is used: |
| 69 |
# today = '' |
| 70 |
# Else, today_fmt is used as the format for a strftime call. |
| 71 |
# today_fmt = '%B %d, %Y' |
| 72 |
|
| 73 |
# List of patterns, relative to source directory, that match files and |
| 74 |
# directories to ignore when looking for source files. |
| 75 |
exclude_patterns = ["_build"] |
| 76 |
|
| 77 |
# The reST default role (used for this markup: `text`) to use for all |
| 78 |
# documents. |
| 79 |
# default_role = None |
| 80 |
|
| 81 |
# If true, '()' will be appended to :func: etc. cross-reference text. |
| 82 |
# add_function_parentheses = True |
| 83 |
|
| 84 |
# If true, the current module name will be prepended to all description |
| 85 |
# unit titles (such as .. function::). |
| 86 |
# add_module_names = True |
| 87 |
|
| 88 |
# If true, sectionauthor and moduleauthor directives will be shown in the |
| 89 |
# output. They are ignored by default. |
| 90 |
# show_authors = False |
| 91 |
|
| 92 |
# The name of the Pygments (syntax highlighting) style to use. |
| 93 |
# pygments_style = "pocoo" |
| 94 |
|
| 95 |
# A list of ignored prefixes for module index sorting. |
| 96 |
# modindex_common_prefix = [] |
| 97 |
|
| 98 |
nitpicky = True |
| 99 |
nitpick_ignore = [ |
| 100 |
("py:class", "mongoengine.connection"), |
| 101 |
("py:class", "ResponseValue"), |
| 102 |
("py:class", "AuthenticatorSelectionCriteria"), |
| 103 |
("py:class", "UserVerificationRequirement"), |
| 104 |
("py:class", "OAuth"), |
| 105 |
("py:class", "OAuthError"), |
| 106 |
("py:class", "authlib.integrations.flask_client.OAuth"), |
| 107 |
("py:class", "TotpMatch"), |
| 108 |
("py:class", "t.Type"), |
| 109 |
("py:class", "t.Callable"), |
| 110 |
("py:class", "t.Any"), |
| 111 |
("py:class", "timedelta"), |
| 112 |
("py:class", "wtforms.fields.core.Field"), |
| 113 |
] |
| 114 |
autodoc_typehints = "description" |
| 115 |
# autodoc_mock_imports = ["flask_sqlalchemy"] |
| 116 |
autodoc_type_aliases = { |
| 117 |
"CbType": "oauth_provider.CbType", |
| 118 |
} |
| 119 |
autosectionlabel_prefix_document = True |
| 120 |
autosectionlabel_maxdepth = 2 |
| 121 |
|
| 122 |
intersphinx_mapping = { |
| 123 |
"python": ("https://docs.python.org/3/", None), |
| 124 |
"werkzeug": ("https://werkzeug.palletsprojects.com/", None), |
| 125 |
"flask": ("https://flask.palletsprojects.com/", None), |
| 126 |
"itsdangerous": ("https://itsdangerous.palletsprojects.com/", None), |
| 127 |
"sqlalchemy": ("https://docs.sqlalchemy.org/", None), |
| 128 |
"wtforms": ("https://wtforms.readthedocs.io/", None), |
| 129 |
"flask_wtforms": ("https://flask-wtf.readthedocs.io", None), |
| 130 |
"flask_sqlalchemy": ("https://flask-sqlalchemy.palletsprojects.com/", None), |
| 131 |
"flask_sqlalchemy_lite": ( |
| 132 |
"https://flask-sqlalchemy-lite.readthedocs.io/en/latest/", |
| 133 |
None, |
| 134 |
), |
| 135 |
"flask_login": ("https://flask-login.readthedocs.io/en/latest/", None), |
| 136 |
"passlib": ("https://passlib.readthedocs.io/en/stable", None), |
| 137 |
"authlib": ("https://docs.authlib.org/en/latest/", None), |
| 138 |
} |
| 139 |
|
| 140 |
# -- Options for HTML output --------------------------------------------- |
| 141 |
|
| 142 |
# The theme to use for HTML and HTML Help pages. Major themes that come with |
| 143 |
# Sphinx are currently 'default' and 'sphinxdoc'. |
| 144 |
html_theme = "flask" |
| 145 |
|
| 146 |
# Theme options are theme-specific and customize the look and feel of a theme |
| 147 |
# further. For a list of options available for each theme, see the |
| 148 |
# documentation. |
| 149 |
html_theme_options = {"index_sidebar_logo": False} |
| 150 |
html_context = { |
| 151 |
"project_links": [ |
| 152 |
ProjectLink("PyPI releases", "https://pypi.org/project/Flask-Security/"), |
| 153 |
ProjectLink("Source Code", "https://github.com/pallets-eco/flask-security/"), |
| 154 |
ProjectLink( |
| 155 |
"Issue Tracker", |
| 156 |
"https://github.com/pallets-eco/flask-security/issues/", |
| 157 |
), |
| 158 |
ProjectLink( |
| 159 |
"Changes", |
| 160 |
"https://flask-security.readthedocs.io/en/stable/changelog.html", |
| 161 |
), |
| 162 |
] |
| 163 |
} |
| 164 |
|
| 165 |
# The name for this set of Sphinx documents. If None, it defaults to |
| 166 |
# "<project> v<release> documentation". |
| 167 |
# html_title = "Flask-Security Documentation ({}).format(version)" |
| 168 |
html_logo = "_static/logo-owl-105.png" |
| 169 |
|
| 170 |
# The name of an image file (within the static path) to use as favicon of the |
| 171 |
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
| 172 |
# pixels large. |
| 173 |
# html_favicon = None |
| 174 |
|
| 175 |
# Add any paths that contain custom static files (such as style sheets) here, |
| 176 |
# relative to this directory. They are copied after the builtin static files, |
| 177 |
# so a file named "default.css" will overwrite the builtin "default.css". |
| 178 |
html_static_path = ["_static", "openapi.yaml"] |
| 179 |
|
| 180 |
|
| 181 |
# Custom sidebar templates, maps document names to template names. |
| 182 |
html_sidebars = { |
| 183 |
"index": ["project.html", "localtoc.html", "searchbox.html"], |
| 184 |
"**": ["relations.html", "searchbox.html", "localtoc.html"], |
| 185 |
} |
| 186 |
singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]} |
| 187 |
|
| 188 |
# If true, links to the reST sources are added to the pages. |
| 189 |
html_show_sourcelink = False |
| 190 |
|
| 191 |
# Output file base name for HTML help builder. |
| 192 |
htmlhelp_basename = "Flask-Securitydoc" |
| 193 |
|
| 194 |
# -- Options for sphinx-issues --------------------------------------------- |
| 195 |
# Github repo |
| 196 |
issues_github_path = "pallets-eco/flask-security" |