Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias alias alias alias alias alias alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias alias alias FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Lambda arguments args defaults vararg Call Call NameLoad NameLoad SubscriptLoad NameLoad Slice Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore ListLoad SubscriptLoad NameLoad Index Str Str Call NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr If NameLoad body Return Call NameLoad BinOpAdd Call AttributeLoad Str attr NameLoad Str Expr Call NameLoad Call AttributeLoad Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr Str Str attr Str Expr Call NameLoad Str If UnaryOpNot NameLoad body Expr Call NameLoad Call NameLoad Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr Str Str attr Str If UnaryOpNot NameLoad body Assign NameStore Call NameLoad NameLoad If NameLoad body Expr Call NameLoad BinOpAdd Str NameLoad Return Call NameLoad Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad FunctionDef arguments args NameParam defaults body If CompareIn Str NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Num Index Num Return Call NameLoad NameLoad decorator_list Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore NameLoad orelse Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad If CompareEq NameLoad NameLoad body Return NameLoad If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Index Num attr orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore SubscriptLoad NameLoad Index Str If CompareNotIn TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str TupleLoad TupleLoad Str Str TupleLoad Str Str body AugAssignAdd NameStore BinOpAdd Str SubscriptLoad NameLoad Index Str If CompareIsNot NameLoad NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body ImportFrom alias Raise Call NameLoad BinOpMod Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareIsNot NameLoad NameLoad body TryExcept body Return Call NameLoad Num Call NameLoad NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad If Call AttributeLoad NameLoad attr Str body Return NameLoad If CompareIs NameLoad NameLoad body Return BoolOpOr BoolOpAnd NameLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Str Return Call NameLoad Call NameLoad NameLoad keyword Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str Str body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Str Return Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str Str body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Str Return Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str Str body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotEq NameLoad NameLoad body AugAssignAdd NameStore BinOpMult Str BinOpSub Call NameLoad NameLoad Call NameLoad NameLoad If CompareNotIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str BinOpAdd NameLoad NameLoad Assign NameStore Call NameLoad NameLoad orelse Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Assign SubscriptStore NameLoad Index Str BinOpAdd Str NameLoad Assign SubscriptStore NameLoad Index Str BinOpAdd NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Return Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str Str body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str attr Str Num If NameLoad body Return Call NameLoad Call NameLoad SubscriptLoad NameLoad Index Num NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str Str NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Num Index Num attr Str Num If CompareEq Call NameLoad NameLoad Num body Assign TupleStore NameStore NameStore NameLoad If BoolOpOr BoolOpAnd CompareEq NameLoad Str CompareEq NameLoad Str BoolOpAnd CompareEq NameLoad Str CompareEq NameLoad Str body Assign NameStore NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body AugAssignAdd NameStore BinOpAdd Str NameLoad Return NameLoad decorator_list Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore SubscriptLoad Call NameLoad NameLoad Slice Num Assign TupleStore NameStore NameStore NameStore SubscriptLoad Call NameLoad Call NameLoad NameLoad NameLoad Slice Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If NameLoad body For NameStore TupleLoad NameLoad NameLoad body If CompareNotIn NameLoad TupleLoad Str Str body Return NameLoad orelse If UnaryOpNot BoolOpAnd CompareIn NameLoad TupleLoad Str Str CompareEq NameLoad NameLoad body Return NameLoad If CompareNotEq NameLoad NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Return BinOpAdd Str Call AttributeLoad SubscriptLoad NameLoad Slice Call NameLoad NameLoad attr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad BinOpMult BinOpMult Num Num Num Str body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad If CompareIsNot NameLoad NameLoad body ImportFrom alias Assign AttributeStore NameLoad attr Lambda arguments args NameParam defaults UnaryOpNot Call NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Lambda arguments args defaults TupleLoad Call NameLoad NameLoad Str Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Lambda arguments args NameParam defaults TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body ImportFrom alias alias alias Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad FunctionDef arguments args NameParam defaults body If CompareIs NameLoad NameLoad body Return TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return TupleLoad NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Return TupleLoad NameLoad Lambda arguments args defaults TupleLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Num decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body FunctionDef arguments args NameParam defaults body If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad orelse Assign NameStore NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return BinOpMod Str TupleLoad Call NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpBitAnd Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str For NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If BoolOpAnd NameLoad CompareNotEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad Str attr BinOpAdd ListLoad Str ListComp NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str BoolOpAnd NameLoad CompareNotEq NameLoad Str Assign NameStore NameLoad For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body If CompareEq NameLoad NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Break If UnaryOpNot Call AttributeLoad NameLoad attr Str body AugAssignAdd NameStore Str If Call AttributeLoad NameLoad attr NameLoad body Assign TupleStore NameStore NameStore Call NameLoad SubscriptLoad NameLoad Slice Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Break If BoolOpOr CompareIs NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BoolOpOr SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore Call NameLoad Assign NameStore ListLoad TupleLoad Str Call NameLoad If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad AugAssignAdd NameStore ListLoad TupleLoad Str BinOpMod Str NameLoad TupleLoad Str BinOpMod Str NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad keyword NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call NameLoad Str NameLoad Return ListLoad Expr Call AttributeLoad NameLoad attr TupleLoad Str Call NameLoad BinOpAdd Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr TupleLoad Str Str Expr Call AttributeLoad NameLoad attr TupleLoad TupleLoad Str NameLoad TupleLoad Str Call NameLoad NameLoad TupleLoad Str Call NameLoad NameLoad Expr Call NameLoad Str NameLoad Return Call NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad Dict decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Str While CompareIn Str NameLoad body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Break Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Str attr SubscriptLoad NameLoad Slice Num Assign NameStore BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Num NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign SubscriptStore NameLoad Index Str BinOpAdd NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return Call NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore ListLoad orelse If Call NameLoad NameLoad body Assign NameStore ListLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Num NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body For NameStore AttributeLoad NameLoad attr body Expr Call NameLoad decorator_list decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str Return Call Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If Call NameLoad AttributeLoad NameLoad attr Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If NameLoad body Return NameLoad Raise Call NameLoad decorator_list decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad body Raise Call NameLoad Str If UnaryOpNot Call NameLoad NameLoad Str body For NameStore NameLoad body If NameLoad body Expr Yield NameLoad Return If BoolOpAnd UnaryOpNot Call NameLoad NameLoad NameLoad CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr While Num body Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Break Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad BinOpMult Num Num body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Str If UnaryOpNot NameLoad body Return Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad TupleLoad NameLoad NameLoad FunctionDef arguments args defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad While Num body Assign NameStore Call NameLoad NameLoad Str If UnaryOpNot NameLoad body Break Assign NameStore ListLoad For NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd NameLoad CompareIn SubscriptLoad NameLoad Slice Num NameLoad body Expr Yield Call NameLoad NameLoad Assign NameStore ListLoad Assign NameStore NameLoad If NameLoad body Expr Yield Call NameLoad NameLoad decorator_list Assign NameStore NameLoad For NameStore Call NameLoad body If BoolOpAnd CompareEq NameLoad NameLoad CompareEq SubscriptLoad NameLoad Slice Num NameLoad body AugAssignAdd NameStore NameLoad Assign NameStore NameLoad If NameLoad body Expr Yield NameLoad Assign NameStore NameLoad If NameLoad body Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad BinOpMult Num Num body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Str If UnaryOpNot NameLoad body Return Assign NameStore Call NameLoad TupleLoad NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore AttributeLoad Str attr orelse Assign NameStore Call NameLoad NameLoad Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Str Call AttributeLoad NameLoad attr NameLoad Str attr Assign NameStore AttributeLoad Str attr Assign NameStore ListLoad While Num body Assign NameStore Call NameLoad NameLoad Str If UnaryOpNot NameLoad body Break Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad For NameStore Call NameLoad NameLoad NameLoad body If CompareEq NameLoad NameLoad body Expr Yield Call NameLoad NameLoad Assign NameStore ListLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad If NameLoad body Expr Yield Call NameLoad NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return CompareGtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults BinOpMult Num Num body Expr Str Assign NameStore BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore NameLoad While CompareGt NameLoad Num body Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AugAssignSub NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareGtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr If BoolOpOr CompareIs NameLoad NameLoad CompareEq NameLoad Num body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr If BoolOpAnd NameLoad CompareNotEq Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareGtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore Call NameLoad NameLoad BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr If BoolOpAnd NameLoad UnaryOpNot NameLoad body Return Call AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad orelse Assign NameStore AttributeLoad NameLoad attr While Num body If CompareIsNot NameLoad NameLoad body AugAssignSub NameStore BinOpSub NameLoad AttributeLoad NameLoad attr If CompareGtE AttributeLoad NameLoad attr NameLoad body Break Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Raise Call NameLoad Return NameLoad decorator_list decorator_list NameLoad
N/A N/A 
    werkzeug.wsgi
    ~~~~~~~~~~~~~

    This module implements WSGI related helpers.

    :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
    :license: BSD, see LICENSE for more details.
 N/A re N/A os N/A sys N/A posixpath N/A mimetypes itertools chain zlib adler32 time time mktime datetime datetime functools partial update_wrapper werkzeug._compat iteritems text_type string_types implements_iterator make_literal_wrapper to_unicode to_bytes wsgi_get_bytes try_coerce_native PY2 werkzeug._internal _empty_stream _encode_idna werkzeug.http is_resource_modified http_date werkzeug.urls uri_to_iri url_quote url_parse url_join responder N/A N/A f N/A N/A N/A Marks a function as responder.  Decorate a function with it and it
    will automatically call the return value as WSGI application.

    Example::

        @responder
        def application(environ, start_response):
            return Response('Hello World!')
     N/A N/A update_wrapper N/A N/A N/A N/A a N/A N/A f a N/A a N/A -2 f N/A get_current_url N/A N/A environ root_only strip_querystring host_only trusted_hosts N/A False False False None N/A N/A A handy helper function that recreates the full URL as IRI for the
    current request or parts of it.  Here an example:

    >>> from werkzeug.test import create_environ
    >>> env = create_environ("/?param=foo", "http://localhost/script")
    >>> get_current_url(env)
    'http://localhost/script/?param=foo'
    >>> get_current_url(env, root_only=True)
    'http://localhost/script/'
    >>> get_current_url(env, host_only=True)
    'http://localhost/'
    >>> get_current_url(env, strip_querystring=True)
    'http://localhost/script/'

    This optionally it verifies that the host is in a list of trusted hosts.
    If the host is not in there it will raise a
    :exc:`~werkzeug.exceptions.SecurityError`.

    Note that the string returned might contain unicode characters as the
    representation is an IRI not an URI.  If you need an ASCII only
    representation you can use the :func:`~werkzeug.urls.iri_to_uri`
    function:

    >>> from werkzeug.urls import iri_to_uri
    >>> iri_to_uri(get_current_url(env))
    'http://localhost/script/?param=foo'

    :param environ: the WSGI environment to get the current URL from.
    :param root_only: set `True` if you only want the root URL.
    :param strip_querystring: set to `True` if you don't want the querystring.
    :param host_only: set to `True` if the host URL should be returned.
    :param trusted_hosts: a list of trusted hosts, see :func:`host_is_trusted`
                          for more information.
     N/A tmp N/A N/A environ N/A wsgi.url_scheme :// N/A get_host environ trusted_hosts N/A cat N/A tmp append N/A host_only N/A N/A N/A uri_to_iri N/A N/A N/A join tmp / N/A N/A cat N/A N/A N/A url_quote N/A wsgi_get_bytes N/A N/A environ get SCRIPT_NAME rstrip / N/A N/A cat / N/A N/A root_only N/A N/A N/A cat N/A url_quote N/A N/A N/A wsgi_get_bytes N/A N/A environ get PATH_INFO lstrip / N/A N/A strip_querystring N/A N/A qs N/A get_query_string environ N/A qs N/A N/A N/A cat N/A ? qs N/A N/A uri_to_iri N/A N/A join tmp N/A host_is_trusted N/A N/A hostname trusted_list N/A N/A N/A Checks if a host is trusted against a list.  This also takes care
    of port normalization.

    .. versionadded:: 0.9

    :param hostname: the hostname to check
    :param trusted_list: a list of hostnames to check against.  If a
                         hostname starts with a dot it will match against
                         all subdomains as well.
     N/A N/A hostname N/A N/A False N/A N/A isinstance trusted_list string_types N/A N/A trusted_list N/A trusted_list _normalize N/A N/A hostname N/A N/A N/A N/A : hostname N/A N/A hostname N/A N/A N/A hostname rsplit : 1 N/A 0 N/A N/A _encode_idna hostname N/A N/A hostname N/A _normalize hostname N/A ref trusted_list N/A N/A N/A N/A ref startswith . N/A N/A ref N/A ref N/A 1 N/A suffix_match True N/A N/A suffix_match False N/A ref N/A _normalize ref N/A N/A ref hostname N/A N/A True N/A N/A suffix_match N/A N/A hostname endswith N/A . ref N/A N/A True N/A False N/A get_host N/A N/A environ trusted_hosts N/A None N/A N/A Return the real host for the given WSGI environment.  This takes care
    of the `X-Forwarded-Host` header.  Optionally it verifies that the host
    is in a list of trusted hosts.  If the host is not in there it will raise
    a :exc:`~werkzeug.exceptions.SecurityError`.

    :param environ: the WSGI environment to get the host of.
    :param trusted_hosts: a list of trusted hosts, see :func:`host_is_trusted`
                          for more information.
     N/A N/A HTTP_X_FORWARDED_HOST environ N/A N/A rv N/A N/A N/A N/A N/A N/A environ N/A HTTP_X_FORWARDED_HOST split , N/A 0 strip N/A N/A N/A HTTP_HOST environ N/A N/A rv N/A environ N/A HTTP_HOST N/A N/A rv N/A environ N/A SERVER_NAME N/A N/A N/A N/A environ N/A wsgi.url_scheme N/A environ N/A SERVER_PORT N/A N/A https 443 N/A http 80 N/A N/A rv N/A : N/A environ N/A SERVER_PORT N/A N/A trusted_hosts None N/A N/A N/A N/A host_is_trusted rv trusted_hosts N/A werkzeug.exceptions SecurityError N/A N/A SecurityError N/A Host "%s" is not trusted rv N/A rv N/A get_content_length N/A N/A environ N/A N/A N/A Returns the content length from the WSGI environment as
    integer.  If it's not available `None` is returned.

    .. versionadded:: 0.9

    :param environ: the WSGI environ to fetch the content length from.
     N/A content_length N/A N/A environ get CONTENT_LENGTH N/A N/A content_length None N/A N/A N/A N/A N/A max 0 N/A int content_length N/A N/A N/A N/A ValueError TypeError N/A N/A N/A get_input_stream N/A N/A environ safe_fallback N/A True N/A N/A Returns the input stream from the WSGI environment and wraps it
    in the most sensible way possible.  The stream returned is not the
    raw WSGI stream in most cases but one that is safe to read from
    without taking into account the content length.

    .. versionadded:: 0.9

    :param environ: the WSGI environ to fetch the stream from.
    :param safe: indicates weather the function should use an empty
                 stream as safe fallback or just return the original
                 WSGI input stream if it can't wrap it safely.  The
                 default is to return an empty string in those cases.
     N/A stream N/A environ N/A wsgi.input N/A content_length N/A get_content_length environ N/A N/A N/A environ get wsgi.input_terminated N/A N/A stream N/A N/A content_length None N/A N/A N/A N/A safe_fallback _empty_stream stream N/A N/A LimitedStream stream content_length N/A get_query_string N/A N/A environ N/A N/A N/A Returns the `QUERY_STRING` from the WSGI environment.  This also takes
    care about the WSGI decoding dance on Python 3 environments as a
    native string.  The string returned will be restricted to ASCII
    characters.

    .. versionadded:: 0.9

    :param environ: the WSGI environment object to get the query string from.
     N/A qs N/A wsgi_get_bytes N/A N/A environ get QUERY_STRING N/A N/A try_coerce_native N/A url_quote qs safe :&%=+$!*'(), N/A get_path_info N/A N/A environ charset errors N/A utf-8 replace N/A N/A Returns the `PATH_INFO` from the WSGI environment and properly
    decodes it.  This also takes care about the WSGI decoding dance
    on Python 3 environments.  if the `charset` is set to `None` a
    bytestring is returned.

    .. versionadded:: 0.9

    :param environ: the WSGI environment object to get the path from.
    :param charset: the charset for the path info, or `None` if no
                    decoding should be performed.
    :param errors: the decoding error handling.
     N/A path N/A wsgi_get_bytes N/A N/A environ get PATH_INFO N/A N/A to_unicode path charset errors allow_none_charset True N/A get_script_name N/A N/A environ charset errors N/A utf-8 replace N/A N/A Returns the `SCRIPT_NAME` from the WSGI environment and properly
    decodes it.  This also takes care about the WSGI decoding dance
    on Python 3 environments.  if the `charset` is set to `None` a
    bytestring is returned.

    .. versionadded:: 0.9

    :param environ: the WSGI environment object to get the path from.
    :param charset: the charset for the path, or `None` if no
                    decoding should be performed.
    :param errors: the decoding error handling.
     N/A path N/A wsgi_get_bytes N/A N/A environ get SCRIPT_NAME N/A N/A to_unicode path charset errors allow_none_charset True N/A pop_path_info N/A N/A environ charset errors N/A utf-8 replace N/A N/A Removes and returns the next segment of `PATH_INFO`, pushing it onto
    `SCRIPT_NAME`.  Returns `None` if there is nothing left on `PATH_INFO`.

    If the `charset` is set to `None` a bytestring is returned.

    If there are empty segments (``'/foo//bar``) these are ignored but
    properly pushed to the `SCRIPT_NAME`:

    >>> env = {'SCRIPT_NAME': '/foo', 'PATH_INFO': '/a/b'}
    >>> pop_path_info(env)
    'a'
    >>> env['SCRIPT_NAME']
    '/foo/a'
    >>> pop_path_info(env)
    'b'
    >>> env['SCRIPT_NAME']
    '/foo/a/b'

    .. versionadded:: 0.5

    .. versionchanged:: 0.9
       The path is now decoded and a charset and encoding
       parameter can be provided.

    :param environ: the WSGI environment that is modified.
     N/A path N/A N/A environ get PATH_INFO N/A N/A path N/A N/A None N/A script_name N/A N/A environ get SCRIPT_NAME N/A old_path path N/A path N/A N/A path lstrip / N/A N/A path old_path N/A N/A script_name N/A / N/A N/A len old_path N/A len path N/A N/A / path N/A N/A N/A environ N/A PATH_INFO N/A N/A environ N/A SCRIPT_NAME N/A script_name path N/A rv N/A wsgi_get_bytes path N/A N/A N/A segment path N/A N/A path split / 1 N/A N/A environ N/A PATH_INFO N/A / path N/A N/A environ N/A SCRIPT_NAME N/A script_name segment N/A rv N/A wsgi_get_bytes segment N/A N/A to_unicode rv charset errors allow_none_charset True N/A peek_path_info N/A N/A environ charset errors N/A utf-8 replace N/A N/A Returns the next segment on the `PATH_INFO` or `None` if there
    is none.  Works like :func:`pop_path_info` without modifying the
    environment:

    >>> env = {'SCRIPT_NAME': '/foo', 'PATH_INFO': '/a/b'}
    >>> peek_path_info(env)
    'a'
    >>> peek_path_info(env)
    'a'

    If the `charset` is set to `None` a bytestring is returned.

    .. versionadded:: 0.5

    .. versionchanged:: 0.9
       The path is now decoded and a charset and encoding
       parameter can be provided.

    :param environ: the WSGI environment that is checked.
     N/A segments N/A N/A N/A N/A N/A N/A environ get PATH_INFO lstrip / split / 1 N/A segments N/A N/A N/A to_unicode N/A wsgi_get_bytes N/A segments N/A 0 charset errors allow_none_charset True N/A extract_path_info N/A N/A environ_or_baseurl path_or_url charset errors collapse_http_schemes N/A utf-8 replace True N/A N/A Extracts the path info from the given URL (or WSGI environment) and
    path.  The path info returned is a unicode string, not a bytestring
    suitable for a WSGI environment.  The URLs might also be IRIs.

    If the path info could not be determined, `None` is returned.

    Some examples:

    >>> extract_path_info('http://example.com/app', '/app/hello')
    u'/hello'
    >>> extract_path_info('http://example.com/app',
    ...                   'https://example.com/app/hello')
    u'/hello'
    >>> extract_path_info('http://example.com/app',
    ...                   'https://example.com/app/hello',
    ...                   collapse_http_schemes=False) is None
    True

    Instead of providing a base URL you can also pass a WSGI environment.

    .. versionadded:: 0.6

    :param environ_or_baseurl: a WSGI environment dict, a base URL or
                               base IRI.  This is the root of the
                               application.
    :param path_or_url: an absolute path from the server root, a
                        relative path (in which case it's the path info)
                        or a full URL.  Also accepts IRIs and unicode
                        parameters.
    :param charset: the charset for byte data in URLs
    :param errors: the error handling on decode
    :param collapse_http_schemes: if set to `False` the algorithm does
                                  not assume that http and https on the
                                  same server point to the same
                                  resource.
     _normalize_netloc N/A N/A scheme netloc N/A N/A N/A parts N/A N/A N/A N/A N/A netloc split @ 1 N/A -1 split : 1 N/A N/A N/A len parts 2 N/A N/A N/A netloc port parts N/A N/A N/A N/A scheme http N/A port 80 N/A N/A scheme https N/A port 443 N/A N/A port None N/A N/A netloc N/A parts N/A 0 N/A port None N/A N/A port None N/A N/A netloc N/A : port N/A netloc N/A N/A path N/A uri_to_iri path_or_url charset errors N/A N/A isinstance environ_or_baseurl dict N/A N/A environ_or_baseurl N/A get_current_url environ_or_baseurl root_only True N/A base_iri N/A uri_to_iri environ_or_baseurl charset errors N/A N/A base_scheme base_netloc base_path N/A N/A url_parse base_iri N/A 3 N/A N/A cur_scheme cur_netloc cur_path N/A N/A url_parse N/A url_join base_iri path N/A 3 N/A base_netloc N/A _normalize_netloc base_scheme base_netloc N/A cur_netloc N/A _normalize_netloc cur_scheme cur_netloc N/A collapse_http_schemes N/A N/A scheme N/A base_scheme cur_scheme N/A N/A N/A scheme N/A http https N/A N/A None N/A N/A N/A N/A N/A base_scheme N/A http https N/A base_scheme cur_scheme N/A N/A None N/A N/A base_netloc cur_netloc N/A N/A None N/A base_path N/A N/A base_path rstrip / N/A N/A N/A N/A cur_path startswith base_path N/A N/A None N/A N/A / N/A N/A N/A cur_path N/A N/A len base_path lstrip / N/A SharedDataMiddleware N/A object N/A N/A A WSGI middleware that provides static content for development
    environments or simple server setups. Usage is quite simple::

        import os
        from werkzeug.wsgi import SharedDataMiddleware

        app = SharedDataMiddleware(app, {
            '/shared': os.path.join(os.path.dirname(__file__), 'shared')
        })

    The contents of the folder ``./shared`` will now be available on
    ``http://example.com/shared/``.  This is pretty useful during development
    because a standalone media server is not required.  One can also mount
    files on the root folder and still continue to use the application because
    the shared data middleware forwards all unhandled requests to the
    application, even if the requests are below one of the shared folders.

    If `pkg_resources` is available you can also tell the middleware to serve
    files from package data::

        app = SharedDataMiddleware(app, {
            '/shared': ('myapplication', 'shared_files')
        })

    This will then serve the ``shared_files`` folder in the `myapplication`
    Python package.

    The optional `disallow` parameter can be a list of :func:`~fnmatch.fnmatch`
    rules for files that are not accessible from the web.  If `cache` is set to
    `False` no caching headers are sent.

    Currently the middleware does not support non ASCII filenames.  If the
    encoding on the file system happens to be the encoding of the URI it may
    work but this could also be by accident.  We strongly suggest using ASCII
    only file names for static files.

    The middleware will guess the mimetype using the Python `mimetype`
    module.  If it's unable to figure out the charset it will fall back
    to `fallback_mimetype`.

    .. versionchanged:: 0.5
       The cache timeout is configurable now.

    .. versionadded:: 0.6
       The `fallback_mimetype` parameter was added.

    :param app: the application to wrap.  If you don't want to wrap an
                application you can pass it :exc:`NotFound`.
    :param exports: a dict of exported files and folders.
    :param disallow: a list of :func:`~fnmatch.fnmatch` rules.
    :param fallback_mimetype: the fallback mimetype for unknown files.
    :param cache: enable or disable caching headers.
    :Param cache_timeout: the cache timeout in seconds for the headers.
     __init__ N/A N/A self app exports disallow cache cache_timeout fallback_mimetype N/A None True N/A N/A 60 60 12 text/plain N/A N/A N/A self app app N/A N/A self exports N/A N/A N/A self cache cache N/A N/A self cache_timeout cache_timeout N/A N/A key value N/A iteritems exports N/A N/A N/A isinstance value tuple N/A N/A loader N/A N/A self get_package_loader value N/A N/A N/A isinstance value string_types N/A N/A N/A N/A N/A os path isfile value N/A N/A loader N/A N/A self get_file_loader value N/A N/A loader N/A N/A self get_directory_loader value N/A N/A N/A TypeError N/A unknown def %r value N/A N/A N/A self exports N/A key loader N/A N/A disallow None N/A fnmatch fnmatch N/A N/A self is_allowed N/A N/A N/A x N/A N/A N/A fnmatch x disallow N/A N/A self fallback_mimetype fallback_mimetype N/A is_allowed N/A N/A self filename N/A N/A N/A Subclasses can override this method to disallow the access to
        certain files.  However by providing `disallow` in the constructor
        this method is overwritten.
         N/A True N/A _opener N/A N/A self filename N/A N/A N/A N/A N/A N/A N/A N/A N/A open filename rb N/A N/A datetime utcfromtimestamp N/A N/A N/A os path getmtime filename N/A int N/A N/A N/A os path getsize filename N/A get_file_loader N/A N/A self filename N/A N/A N/A N/A N/A N/A x N/A N/A N/A N/A N/A os path basename filename N/A N/A self _opener filename N/A get_package_loader N/A N/A self package package_path N/A N/A pkg_resources DefaultProvider ResourceManager get_provider N/A loadtime N/A N/A datetime utcnow N/A provider N/A get_provider package N/A manager N/A ResourceManager N/A filesystem_bound N/A isinstance provider DefaultProvider loader N/A N/A path N/A N/A N/A N/A path None N/A N/A N/A None None N/A path N/A N/A posixpath join package_path path N/A N/A N/A N/A provider has_resource path N/A N/A N/A None None N/A basename N/A N/A posixpath basename path N/A filesystem_bound N/A N/A N/A basename N/A N/A self _opener N/A N/A provider get_resource_filename manager path N/A N/A basename N/A N/A N/A N/A N/A N/A N/A provider get_resource_stream manager path loadtime 0 N/A N/A loader N/A get_directory_loader N/A N/A self directory N/A N/A loader N/A N/A path N/A N/A N/A N/A path None N/A N/A path N/A N/A N/A os path join directory path N/A N/A path directory N/A N/A N/A N/A os path isfile path N/A N/A N/A N/A N/A N/A os path basename path N/A N/A self _opener path N/A N/A None None N/A N/A loader N/A generate_etag N/A N/A self mtime file_size real_filename N/A N/A N/A N/A N/A isinstance real_filename bytes N/A N/A real_filename N/A N/A real_filename encode N/A N/A sys getfilesystemencoding N/A N/A wzsdm-%d-%s-%s N/A N/A mktime N/A N/A mtime timetuple file_size N/A N/A adler32 real_filename 4294967295 N/A __call__ N/A N/A self environ start_response N/A N/A N/A cleaned_path N/A get_path_info environ N/A PY2 N/A N/A cleaned_path N/A N/A cleaned_path encode N/A N/A sys getfilesystemencoding N/A cleaned_path N/A N/A cleaned_path strip / N/A sep N/A N/A os sep N/A os altsep N/A N/A N/A sep N/A sep / N/A N/A cleaned_path N/A N/A cleaned_path replace sep / N/A path N/A N/A / join N/A N/A N/A x N/A x N/A N/A cleaned_path split / N/A x N/A x .. N/A file_loader None N/A N/A search_path loader N/A iteritems N/A self exports N/A N/A N/A search_path path N/A N/A N/A real_filename file_loader N/A loader None N/A N/A file_loader None N/A N/A N/A N/A N/A N/A search_path endswith / N/A N/A search_path / N/A N/A N/A path startswith search_path N/A N/A N/A real_filename file_loader N/A loader N/A path N/A N/A len search_path N/A N/A file_loader None N/A N/A N/A N/A N/A file_loader None N/A N/A N/A self is_allowed real_filename N/A N/A N/A N/A self app environ start_response N/A guessed_type N/A N/A mimetypes guess_type real_filename N/A mime_type N/A N/A guessed_type N/A 0 N/A self fallback_mimetype N/A N/A f mtime file_size N/A file_loader N/A headers N/A N/A Date N/A http_date N/A N/A self cache N/A N/A timeout N/A self cache_timeout N/A etag N/A N/A self generate_etag mtime file_size real_filename N/A headers N/A N/A Etag N/A "%s" etag N/A Cache-Control N/A max-age=%d, public timeout N/A N/A N/A is_resource_modified environ etag last_modified mtime N/A N/A N/A N/A f close N/A N/A start_response 304 Not Modified headers N/A N/A N/A N/A N/A headers append N/A Expires N/A http_date N/A N/A time timeout N/A N/A N/A N/A headers append N/A Cache-Control public N/A N/A N/A headers extend N/A N/A Content-Type mime_type N/A Content-Length N/A str file_size N/A Last-Modified N/A http_date mtime N/A N/A start_response 200 OK headers N/A N/A wrap_file environ f N/A N/A DispatcherMiddleware N/A object N/A N/A Allows one to mount middlewares or applications in a WSGI application.
    This is useful if you want to combine multiple WSGI applications::

        app = DispatcherMiddleware(app, {
            '/app2':        app2,
            '/app3':        app3
        })
     __init__ N/A N/A self app mounts N/A None N/A N/A N/A self app app N/A N/A self mounts N/A mounts N/A N/A __call__ N/A N/A self environ start_response N/A N/A N/A script N/A N/A environ get PATH_INFO N/A path_info N/A N/A / script N/A N/A N/A script N/A self mounts N/A N/A app N/A N/A self mounts N/A script N/A N/A items N/A N/A script split / N/A script N/A N/A / join N/A items N/A -1 N/A path_info N/A /%s%s N/A N/A items N/A -1 path_info N/A N/A app N/A N/A N/A self mounts get script N/A self app N/A original_script_name N/A N/A environ get SCRIPT_NAME N/A N/A environ N/A SCRIPT_NAME N/A original_script_name script N/A N/A environ N/A PATH_INFO path_info N/A N/A app environ start_response N/A N/A ClosingIterator N/A object N/A N/A The WSGI specification requires that all middlewares and gateways
    respect the `close` callback of an iterator.  Because it is useful to add
    another close action to a returned iterator and adding a custom iterator
    is a boring task this class can be used for that::

        return ClosingIterator(app(environ, start_response), [cleanup_session,
                                                              cleanup_locals])

    If there is just one close function it can be passed instead of the list.

    A closing iterator is not needed if the application uses response objects
    and finishes the processing if the response is started::

        try:
            return response(environ, start_response)
        finally:
            cleanup_session()
            cleanup_locals()
     __init__ N/A N/A self iterable callbacks N/A None N/A N/A iterator N/A iter iterable N/A N/A self _next N/A partial next iterator N/A N/A callbacks None N/A N/A callbacks N/A N/A N/A N/A callable callbacks N/A N/A callbacks N/A callbacks N/A N/A callbacks N/A list callbacks N/A iterable_close N/A getattr iterator close None N/A iterable_close N/A N/A N/A N/A callbacks insert 0 iterable_close N/A N/A self _callbacks callbacks N/A __iter__ N/A N/A self N/A N/A N/A self N/A __next__ N/A N/A self N/A N/A N/A N/A N/A self _next N/A close N/A N/A self N/A N/A N/A callback N/A self _callbacks N/A N/A N/A callback N/A N/A implements_iterator wrap_file N/A N/A environ file buffer_size N/A 8192 N/A N/A Wraps a file.  This uses the WSGI server's file wrapper if available
    or otherwise the generic :class:`FileWrapper`.

    .. versionadded:: 0.5

    If the file wrapper from the WSGI server is used it's important to not
    iterate over it from inside the application but to pass it through
    unchanged.  If you want to pass out a file wrapper inside a response
    object you have to set :attr:`~BaseResponse.direct_passthrough` to `True`.

    More information about file wrappers are available in :pep:`333`.

    :param file: a :class:`file`-like object with a :meth:`~file.read` method.
    :param buffer_size: number of bytes for one iteration.
     N/A N/A N/A N/A environ get wsgi.file_wrapper FileWrapper file buffer_size N/A FileWrapper N/A object N/A N/A This class can be used to convert a :class:`file`-like object into
    an iterable.  It yields `buffer_size` blocks until the file is fully
    read.

    You should not use this class directly but rather use the
    :func:`wrap_file` function that uses the WSGI server's file wrapper
    support if it's available.

    .. versionadded:: 0.5

    If you're using this object together with a :class:`BaseResponse` you have
    to use the `direct_passthrough` mode.

    :param file: a :class:`file`-like object with a :meth:`~file.read` method.
    :param buffer_size: number of bytes for one iteration.
     __init__ N/A N/A self file buffer_size N/A 8192 N/A N/A N/A self file file N/A N/A self buffer_size buffer_size N/A close N/A N/A self N/A N/A N/A N/A hasattr N/A self file close N/A N/A N/A N/A N/A self file close N/A __iter__ N/A N/A self N/A N/A N/A self N/A __next__ N/A N/A self N/A N/A N/A data N/A N/A N/A self file read N/A self buffer_size N/A data N/A N/A data N/A N/A StopIteration N/A N/A implements_iterator _make_chunk_iter N/A N/A stream limit buffer_size N/A N/A N/A Helper for the line and chunk iter functions. N/A N/A isinstance stream N/A bytes bytearray text_type N/A N/A N/A TypeError Passed a string or byte object instead of true iterator or stream. N/A N/A N/A hasattr stream read N/A N/A item stream N/A N/A item N/A N/A N/A item N/A N/A N/A N/A N/A isinstance stream LimitedStream N/A limit None N/A N/A stream N/A LimitedStream stream limit N/A _read N/A stream read N/A 1 N/A N/A item N/A _read buffer_size N/A N/A item N/A N/A N/A N/A item N/A make_line_iter N/A N/A stream limit buffer_size N/A None N/A 10 1024 N/A N/A Safely iterates line-based over an input stream.  If the input stream
    is not a :class:`LimitedStream` the `limit` parameter is mandatory.

    This uses the stream's :meth:`~file.read` method internally as opposite
    to the :meth:`~file.readline` method that is unsafe and can only be used
    in violation of the WSGI specification.  The same problem applies to the
    `__iter__` function of the input stream which calls :meth:`~file.readline`
    without arguments.

    If you need line-by-line processing it's strongly recommended to iterate
    over the input stream using this helper function.

    .. versionchanged:: 0.8
       This function now ensures that the limit was reached.

    .. versionadded:: 0.9
       added support for iterators as input stream.

    :param stream: the stream or iterate to iterate over.
    :param limit: the limit in bytes for the stream.  (Usually
                  content length.  Not necessary if the `stream`
                  is a :class:`LimitedStream`.
    :param buffer_size: The optional buffer size.
     N/A _iter N/A _make_chunk_iter stream limit buffer_size N/A first_item N/A next _iter N/A N/A first_item N/A N/A N/A s N/A make_literal_wrapper first_item N/A empty N/A s N/A cr N/A s N/A lf N/A s N/A crlf N/A s N/A _iter N/A chain N/A first_item _iter _iter_basic_lines N/A N/A N/A N/A N/A _join N/A empty join N/A buffer N/A N/A 1 N/A N/A new_data N/A next _iter N/A N/A new_data N/A N/A N/A new_buf N/A N/A item N/A chain buffer N/A N/A new_data splitlines True N/A N/A N/A N/A new_buf append item N/A N/A item N/A N/A item N/A -1 crlf N/A N/A N/A N/A _join new_buf N/A new_buf N/A N/A buffer new_buf N/A buffer N/A N/A N/A N/A _join buffer N/A N/A previous empty N/A item N/A _iter_basic_lines N/A N/A N/A N/A item lf N/A N/A previous N/A -1 cr N/A N/A previous item N/A item empty N/A previous N/A N/A N/A previous N/A previous item N/A previous N/A N/A N/A previous N/A make_chunk_iter N/A N/A stream separator limit buffer_size N/A None N/A 10 1024 N/A N/A Works like :func:`make_line_iter` but accepts a separator
    which divides chunks.  If you want newline based processing
    you should use :func:`make_line_iter` instead as it
    supports arbitrary newline markers.

    .. versionadded:: 0.8

    .. versionadded:: 0.9
       added support for iterators as input stream.

    :param stream: the stream or iterate to iterate over.
    :param separator: the separator that divides chunks.
    :param limit: the limit in bytes for the stream.  (Usually
                  content length.  Not necessary if the `stream`
                  is otherwise already limited).
    :param buffer_size: The optional buffer size.
     N/A _iter N/A _make_chunk_iter stream limit buffer_size N/A first_item N/A next _iter N/A N/A first_item N/A N/A N/A _iter N/A chain N/A first_item _iter N/A N/A isinstance first_item text_type N/A N/A separator N/A to_unicode separator N/A _split N/A N/A N/A re compile N/A (%s) N/A N/A re escape separator split N/A _join N/A join N/A N/A separator N/A to_bytes separator N/A _split N/A N/A N/A re compile N/A N/A ( N/A N/A re escape separator ) split N/A _join N/A join N/A buffer N/A N/A 1 N/A N/A new_data N/A next _iter N/A N/A new_data N/A N/A N/A chunks N/A _split new_data N/A new_buf N/A N/A item N/A chain buffer chunks N/A N/A N/A item separator N/A N/A N/A N/A _join new_buf N/A new_buf N/A N/A N/A N/A N/A new_buf append item N/A buffer new_buf N/A buffer N/A N/A N/A N/A _join buffer N/A LimitedStream N/A object N/A N/A Wraps a stream so that it doesn't read more than n bytes.  If the
    stream is exhausted and the caller tries to get more bytes from it
    :func:`on_exhausted` is called which by default returns an empty
    string.  The return value of that function is forwarded
    to the reader function.  So if it returns an empty string
    :meth:`read` will return an empty string as well.

    The limit however must never be higher than what the stream can
    output.  Otherwise :meth:`readlines` will try to read past the
    limit.

    .. admonition:: Note on WSGI compliance

       calls to :meth:`readline` and :meth:`readlines` are not
       WSGI compliant because it passes a size argument to the
       readline methods.  Unfortunately the WSGI PEP is not safely
       implementable without a size argument to :meth:`readline`
       because there is no EOF marker in the stream.  As a result
       of that the use of :meth:`readline` is discouraged.

       For the same reason iterating over the :class:`LimitedStream`
       is not portable.  It internally calls :meth:`readline`.

       We strongly suggest using :meth:`read` only or using the
       :func:`make_line_iter` which safely iterates line-based
       over a WSGI input stream.

    :param stream: the stream to wrap.
    :param limit: the limit for the stream, must not be longer than
                  what the string can provide if the stream does not
                  end with `EOF` (like `wsgi.input`)
     __init__ N/A N/A self stream limit N/A N/A N/A N/A self _read N/A stream read N/A N/A self _readline N/A stream readline N/A N/A self _pos 0 N/A N/A self limit limit N/A __iter__ N/A N/A self N/A N/A N/A self N/A is_exhausted N/A N/A self N/A N/A N/A If the stream is exhausted this attribute is `True`. N/A N/A N/A self _pos N/A self limit N/A property on_exhausted N/A N/A self N/A N/A N/A This is called when the stream tries to read past the limit.
        The return value of this function is returned from the reading
        function.
         N/A N/A N/A self _read 0 N/A on_disconnect N/A N/A self N/A N/A N/A What should happen if a disconnect is detected?  The return
        value of this function is returned from read functions in case
        the client went away.  By default a
        :exc:`~werkzeug.exceptions.ClientDisconnected` exception is raised.
         werkzeug.exceptions ClientDisconnected N/A N/A ClientDisconnected N/A exhaust N/A N/A self chunk_size N/A N/A 1024 64 N/A N/A Exhaust the stream.  This consumes all the data left until the
        limit is reached.

        :param chunk_size: the size for a chunk.  It will read the chunk
                           until the stream is exhausted and throw away
                           the results.
         N/A to_read N/A N/A self limit N/A self _pos N/A chunk chunk_size N/A N/A to_read 0 N/A N/A chunk N/A min to_read chunk N/A N/A N/A self read chunk N/A to_read chunk N/A read N/A N/A self size N/A None N/A N/A Read `size` bytes or if size is not provided everything is read.

        :param size: the number of bytes read.
         N/A N/A N/A self _pos N/A self limit N/A N/A N/A N/A self on_exhausted N/A N/A N/A size None N/A size -1 N/A N/A size N/A self limit N/A to_read N/A min N/A N/A self limit N/A self _pos size N/A N/A N/A read N/A N/A self _read to_read N/A N/A N/A N/A IOError ValueError N/A N/A N/A N/A self on_disconnect N/A N/A to_read N/A N/A len read to_read N/A N/A N/A N/A self on_disconnect N/A N/A self _pos N/A len read N/A read N/A readline N/A N/A self size N/A None N/A N/A Reads one line from the stream. N/A N/A N/A self _pos N/A self limit N/A N/A N/A N/A self on_exhausted N/A N/A size None N/A N/A size N/A N/A self limit N/A self _pos N/A N/A size N/A min size N/A N/A self limit N/A self _pos N/A N/A N/A line N/A N/A self _readline size N/A N/A N/A N/A ValueError IOError N/A N/A N/A N/A self on_disconnect N/A N/A size N/A line N/A N/A N/A N/A self on_disconnect N/A N/A self _pos N/A len line N/A line N/A readlines N/A N/A self size N/A None N/A N/A Reads a file into a list of strings.  It calls :meth:`readline`
        until the file is read to the end.  It does support the optional
        `size` argument if the underlaying stream supports it for
        `readline`.
         N/A last_pos N/A self _pos N/A result N/A N/A N/A size None N/A N/A end N/A min N/A self limit N/A last_pos size N/A N/A end N/A self limit N/A 1 N/A N/A N/A size None N/A N/A size N/A last_pos N/A self _pos N/A N/A N/A self _pos end N/A N/A N/A N/A N/A result append N/A N/A self readline size N/A N/A size None N/A N/A last_pos N/A self _pos N/A result N/A tell N/A N/A self N/A N/A N/A Returns the position of the stream.

        .. versionadded:: 0.9
         N/A N/A self _pos N/A __next__ N/A N/A self N/A N/A N/A line N/A N/A self readline N/A N/A line N/A N/A N/A StopIteration N/A line N/A N/A implements_iterator