module documentation

Undocumented

Class Scaffold Common behavior shared between :class:`~flask.Flask` and :class:`~flask.blueprints.Blueprint`.
Function find_package Find the prefix that a package is installed under, and the path that it would be imported from.
Function setupmethod Undocumented
Type Variable F Undocumented
Type Variable T_after_request Undocumented
Type Variable T_before_request Undocumented
Type Variable T_error_handler Undocumented
Type Variable T_route Undocumented
Type Variable T_teardown Undocumented
Type Variable T_template_context_processor Undocumented
Type Variable T_url_defaults Undocumented
Type Variable T_url_value_preprocessor Undocumented
Function _endpoint_from_view_func Internal helper that returns the default endpoint for a given function. This always is the function name.
Function _find_package_path Find the path that contains the package or module.
Function _matching_loader_thinks_module_is_package Attempt to figure out if the given name is a package or a module.
Function _path_is_relative_to Undocumented
Variable _sentinel Undocumented
def find_package(import_name: str): (source)

Find the prefix that a package is installed under, and the path that it would be imported from. The prefix is the directory containing the standard directory hierarchy (lib, bin, etc.). If the package is not installed to the system (:attr:`sys.prefix`) or a virtualenv (``site-packages``), ``None`` is returned. The path is the entry in :attr:`sys.path` that contains the package for import. If the package is not installed, it's assumed that the package was imported from the current working directory.

def setupmethod(f: F) -> F: (source)

Undocumented

Undocumented

Value
t.TypeVar('F',
          bound=t.Callable[..., t.Any])
T_after_request = (source)

Undocumented

Value
t.TypeVar('T_after_request',
          bound=ft.AfterRequestCallable)
T_before_request = (source)

Undocumented

Value
t.TypeVar('T_before_request',
          bound=ft.BeforeRequestCallable)
T_error_handler = (source)

Undocumented

Value
t.TypeVar('T_error_handler',
          bound=ft.ErrorHandlerCallable)

Undocumented

Value
t.TypeVar('T_route',
          bound=ft.RouteCallable)
T_teardown = (source)

Undocumented

Value
t.TypeVar('T_teardown',
          bound=ft.TeardownCallable)
T_template_context_processor = (source)

Undocumented

Value
t.TypeVar('T_template_context_processor',
          bound=ft.TemplateContextProcessorCallable)
T_url_defaults = (source)

Undocumented

Value
t.TypeVar('T_url_defaults',
          bound=ft.URLDefaultCallable)
T_url_value_preprocessor = (source)

Undocumented

Value
t.TypeVar('T_url_value_preprocessor',
          bound=ft.URLValuePreprocessorCallable)
def _endpoint_from_view_func(view_func: t.Callable) -> str: (source)

Internal helper that returns the default endpoint for a given function. This always is the function name.

def _find_package_path(import_name): (source)

Find the path that contains the package or module.

def _matching_loader_thinks_module_is_package(loader, mod_name): (source)

Attempt to figure out if the given name is a package or a module. :param: loader: The loader that handled the name. :param mod_name: The name of the package or module.

def _path_is_relative_to(path: pathlib.PurePath, base: str) -> bool: (source)

Undocumented

_sentinel = (source)

Undocumented