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
|
#
import os
import sys
sys.path.insert(0, os.path.abspath("../../"))
sys.path.insert(0, os.path.abspath("./"))
from theme_config import *
import limits
project = "limits"
description = "limits is a python library to perform rate limiting with commonly used storage backends"
copyright = "2023, Ali-Akber Saifee"
if ".post0.dev" in limits.__version__:
version, ahead = limits.__version__.split(".post0.dev")
else:
version = limits.__version__
release = version
html_static_path = ["./_static"]
html_css_files = [
"custom.css",
]
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 version: <b>{release}</b> 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
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosectionlabel",
"sphinx.ext.autosummary",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx.ext.mathjax",
"sphinxext.opengraph",
"sphinxcontrib.programoutput",
"sphinx_copybutton",
"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"
autosectionlabel_maxdepth = 3
autosectionlabel_prefix_document = True
extlinks = {"pypi": ("https://pypi.org/project/%s", "%s")}
intersphinx_mapping = {
"python": ("http://docs.python.org/", None),
"coredis": ("https://coredis.readthedocs.io/en/latest/", None),
"emcache": ("https://emcache.readthedocs.io/en/latest/", None),
"motor": ("https://motor.readthedocs.io/en/stable/", None),
"redis-py-cluster": ("https://redis-py-cluster.readthedocs.io/en/latest/", None),
"redis-py": ("https://redis-py.readthedocs.io/en/latest/", None),
"pymemcache": ("https://pymemcache.readthedocs.io/en/latest/", None),
"pymongo": ("https://pymongo.readthedocs.io/en/stable/", None),
"python-etcd3": ("https://python-etcd3.readthedocs.io/en/latest/", None),
"aetcd": ("https://aetcd.readthedocs.io/en/latest/", None),
"valkey-py": ("https://valkey-py.readthedocs.io/en/latest/", None),
}
|