Update
This commit is contained in:
20
docs/Makefile
Normal file
20
docs/Makefile
Normal file
@@ -0,0 +1,20 @@
|
||||
# Minimal makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line, and also
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = source
|
||||
BUILDDIR = build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
28
docs/source/conf.py
Normal file
28
docs/source/conf.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# Configuration file for the Sphinx documentation builder.
|
||||
#
|
||||
# For the full list of built-in configuration values, see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
|
||||
project = 'router'
|
||||
copyright = '2023-2024, RemiZOffAlex'
|
||||
author = 'RemiZOffAlex'
|
||||
release = '0.1.0'
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
extensions = []
|
||||
|
||||
templates_path = ['_templates']
|
||||
exclude_patterns = []
|
||||
|
||||
language = 'ru'
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
||||
|
||||
html_theme = 'alabaster'
|
||||
html_static_path = ['_static']
|
||||
22
docs/source/description.rst
Normal file
22
docs/source/description.rst
Normal file
@@ -0,0 +1,22 @@
|
||||
Абстракция
|
||||
|
||||
Брокер на основе правил принимает решение что вызывать,
|
||||
как вызывать и какие параметры передать при вызове
|
||||
|
||||
Описание
|
||||
|
||||
|
||||
Правила (rule) - содержит описание правил
|
||||
comparator - функция, которая имеет правила и которой передаются параметры запроса
|
||||
Компаратор возвращает функцию и извлечённые из запроса параметры
|
||||
|
||||
endpoint - вызываемая функция, которой передаются параметры
|
||||
|
||||
rule = {
|
||||
'url': '/'
|
||||
}
|
||||
@broker.route(
|
||||
comparator = comparator_flask(rule=rule)
|
||||
)
|
||||
def foo():
|
||||
return 'foo'
|
||||
20
docs/source/index.rst
Normal file
20
docs/source/index.rst
Normal file
@@ -0,0 +1,20 @@
|
||||
.. router documentation master file, created by
|
||||
sphinx-quickstart on Mon Oct 2 02:47:03 2023.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Документация маршрутизатора
|
||||
===========================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Содержание:
|
||||
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
Reference in New Issue
Block a user