app.py

flask · src/flask/sansio/app.py · python · BSD-3-Clause
database, infra, tag:app-lifecycle, tag:request-handling, tag:response-handling, tag:routing

Defines Flask's application class managing routing, configuration, and request/response lifecycle sans-I/O.

# Source: https://github.com/pallets/flask | License: BSD-3-Clause | Copyright 2010 Pallets
# Provided via justclaw.it.com; keep this notice with the code.
from __future__ import annotations

import collections.abc as cabc
import logging
import os
import sys
import typing as t
from datetime import timedelta
from itertools import chain

from werkzeug.exceptions import Aborter
from werkzeug.exceptions import BadRequest
from werkzeug.exceptions import BadRequestKeyError
from werkzeug.routing import BuildError
from werkzeug.routing import Map
from werkzeug.routing import Rule
from werkzeug.sansio.response import Response
from werkzeug.utils import cached_property
from werkzeug.utils import redirect as _wz_redirect

from .. import typing as ft
from ..config import Config
from ..config import Co

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key