File: conf.py

package info (click to toggle)
flask-limiter 3.12-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,264 kB
  • sloc: python: 6,432; makefile: 165; sh: 67
file content (97 lines) | stat: -rw-r--r-- 2,802 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#

import os
import re
import sys

sys.path.insert(0, os.path.abspath("../../"))
sys.path.insert(0, os.path.abspath("./"))

from theme_config import *

import flask_limiter

description = "Flask-Limiter adds rate limiting to flask applications."
copyright = "2023, Ali-Akber Saifee"
project = "Flask-Limiter"

ahead = 0

if ".post0.dev" in flask_limiter.__version__:
    version, ahead = flask_limiter.__version__.split(".post0.dev")
else:
    version = flask_limiter.__version__

release = version

html_title = f"{project} <small><b style='color: var(--color-brand-primary)'>{{{release}}}</b></small>"
try:
    ahead = int(ahead)

    if ahead > 0:
        html_theme_options[
            "announcement"
        ] = f"""
        This is a development version. The documentation for the latest stable version can be found <a href="/en/stable">here</a>
        """
        html_title = f"{project} <small><b style='color: var(--color-brand-primary)'>{{dev}}</b></small>"
except:
    pass

html_favicon = "_static/tap-icon.ico"
html_static_path = ["./_static"]
templates_path = ["./_templates"]
html_css_files = [
    "custom.css",
    "colors.css",
]

html_theme_options.update({"light_logo": "tap-icon.png", "dark_logo": "tap-icon.png"})

extensions = [
    "sphinx.ext.autodoc",
    "sphinx.ext.autosectionlabel",
    "sphinx.ext.autosummary",
    "sphinx.ext.extlinks",
    "sphinx.ext.intersphinx",
    "sphinxext.opengraph",
    "sphinx.ext.todo",
    "sphinx.ext.viewcode",
    "sphinxcontrib.programoutput",
    "sphinx_issues",
    "sphinx_inline_tabs",
    "sphinx_paramlinks",
]

autodoc_default_options = {
    "members": True,
    "inherited-members": True,
    "inherit-docstrings": True,
    "member-order": "bysource",
}
add_module_names = False
autoclass_content = "both"
autodoc_typehints_format = "short"
autodoc_preserve_defaults = True
autosectionlabel_maxdepth = 3
autosectionlabel_prefix_document = True
issues_github_path = "alisaifee/flask-limiter"

ogp_image = "_static/logo-og.png"

extlinks = {
    "pypi": ("https://pypi.org/project/%s", "%s"),
    "githubsrc": ("https://github.com/alisaifee/flask-limiter/blob/master/%s", "%s"),
}

intersphinx_mapping = {
    "python": ("/usr/share/doc/python3-doc/html", None),
    "limits": ("/usr/share/doc/python-limits-doc/html", None),
    "redis-py-cluster": ("/usr/share/doc/python-rediscluster-doc/html", None),
#    "redis-py": ("https://redis-py.readthedocs.io/en/latest/", None),
#    "pymemcache": ("https://pymemcache.readthedocs.io/en/latest/", None),
    "pymongo": ("/usr/share/doc/python-pymongo-doc/html", None),
    "flask": ("/usr/share/doc/python-flask-doc/html", None),
    "werkzeug": ("/usr/share/doc/python-werkzeug-doc/html", None),
    "flaskrestful": ("/usr/share/doc/python-flask-restful-doc/html", None),
}