module documentation

Undocumented

Class EndpointPrefix Prefixes all endpoints (which must be strings for this factory) with another string. This can be useful for sub applications::
Class Rule A Rule represents one URL pattern. There are some options for `Rule` that change the way it behaves and are passed to the `Rule` constructor. Note that besides the rule-string all arguments *must* be keyword arguments in order to not break the application on Werkzeug upgrades.
Class RuleFactory As soon as you have more complex URL setups it's a good idea to use rule factories to avoid repetitive tasks. Some of them are builtin, others can be added by subclassing `RuleFactory` and overriding `get_rules`.
Class RulePart A part of a rule.
Class RuleTemplate Returns copies of the rules wrapped and expands string templates in the endpoint, rule, defaults or subdomain sections.
Class RuleTemplateFactory A factory that fills in template variables into rules. Used by `RuleTemplate` internally.
Class Subdomain All URLs provided by this factory have the subdomain set to a specific domain. For example if you want to use the subdomain for the current language this can be a good setup::
Class Submount Like `Subdomain` but prefixes the URL rule with a given string::
Class Weighting Undocumented
Function parse_converter_args Undocumented
Function _find Find the *target* in *value* after *pos*.
Function _prefix_names ast parse and prefix names with `.` to avoid collision with user vars
Function _pythonize Undocumented
Constant _CALL_CONVERTER_CODE_FMT Undocumented
Constant _IF_KWARGS_URL_ENCODE_AST Undocumented
Constant _IF_KWARGS_URL_ENCODE_CODE Undocumented
Constant _PYTHON_CONSTANTS Undocumented
Constant _URL_ENCODE_AST_NAMES Undocumented
Variable _converter_args_re Undocumented
Variable _part_re Undocumented
Variable _simple_rule_re Undocumented
def parse_converter_args(argstr: str) -> t.Tuple[t.Tuple, t.Dict[str, t.Any]]: (source)

Undocumented

def _find(value: str, target: str, pos: int) -> int: (source)

Find the *target* in *value* after *pos*. Returns the *value* length if *target* isn't found.

def _prefix_names(src: str) -> ast.stmt: (source)

ast parse and prefix names with `.` to avoid collision with user vars

def _pythonize(value: str) -> t.Union[None, bool, int, float, str]: (source)

Undocumented

_CALL_CONVERTER_CODE_FMT: str = (source)

Undocumented

Value
'self._converters[{elem!r}].to_url()'
_IF_KWARGS_URL_ENCODE_AST = (source)
_IF_KWARGS_URL_ENCODE_CODE: str = (source)

Undocumented

Value
'''if kwargs:
    params = self._encode_query_vars(kwargs)
    q = "?" if params else ""
else:
    q = params = ""
'''
_PYTHON_CONSTANTS: dict = (source)

Undocumented

Value
{'None': None, 'True': True, 'False': False}
_URL_ENCODE_AST_NAMES = (source)

Undocumented

Value
(_prefix_names('q'), _prefix_names('params'))
_converter_args_re = (source)

Undocumented

_part_re = (source)

Undocumented

_simple_rule_re = (source)

Undocumented