Module Expr Str ImportFrom alias Expr Call NameLoad Call NameLoad Str keyword Num ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad BoolOpOr Call AttributeLoad NameLoad attr Str Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad If CompareIs NameLoad NameLoad body While CompareLt AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad NameLoad BinOpSub NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Num While CompareLt NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad BinOpSub NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd AttributeStore NameLoad attr NameLoad AugAssignAdd NameStore NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore ListLoad While CompareLt AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list
N/A N/A 
    werkzeug.contrib.reporterstream
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    This module implements a class that can wrap `wsgi.input` in order to be
    informed about changes of the stream.  This is useful if you want to
    display a progress bar for the upload.

    :copyright: (c) 2009 by the Werkzeug Team, see AUTHORS for more details.
    :license: BSD, see LICENSE for more details.
 warnings warn N/A N/A warn N/A DeprecationWarning reporter stream is deprecated.  If you want to continue using this class copy the module code from the werkzeug wiki: http://dev.pocoo.org/projects/werkzeug/wiki/ReporterStream stacklevel 2 BaseReporterStream N/A object N/A N/A 
    This class can be used to wrap `wsgi.input` in order to be informed about
    changes of the stream.

    Usage::

        from random import randrange

        class ReporterStream(BaseReporterStream):

            def __init__(self, environ):
                super(ReporterStream, self).__init__(environ, 1024 * 16)
                self.transport_id = randrange(0, 100000)

            def processed(self):
                s = self.environ['my.session.service']
                s.store['upload/%s' % self.transport_id] = (self.pos, self.length)
                s.flush()


    And before accessing `request.form` or similar attributes add the stream:

        stream = ReporterStream(environ)
        environ['wsgi.input'] = stream
     __init__ N/A N/A self environ threshold N/A N/A N/A N/A self threshold threshold N/A N/A self length N/A int N/A N/A N/A environ get CONTENT_LENGTH 0 N/A N/A self pos 0 N/A N/A self environ environ N/A N/A self _stream N/A environ N/A wsgi.input N/A processed N/A N/A self N/A N/A N/A Called after pos has changed for threshold or a line was read. N/A read N/A N/A self size N/A None N/A N/A length N/A self length N/A threshold N/A self threshold N/A buffer N/A N/A N/A size None N/A N/A N/A N/A self pos length N/A N/A step N/A min threshold N/A length N/A self pos N/A data N/A N/A N/A self _stream read step N/A N/A self pos step N/A N/A N/A self processed N/A N/A N/A buffer append data N/A N/A read 0 N/A N/A read size N/A N/A step N/A min threshold N/A length N/A self pos N/A step N/A min step size N/A data N/A N/A N/A self _stream read step N/A N/A self pos step N/A read step N/A N/A N/A self processed N/A N/A N/A buffer append data N/A N/A N/A join buffer N/A readline N/A N/A self N/A args N/A N/A line N/A N/A N/A self _stream readline args N/A N/A self pos N/A len line N/A N/A N/A self processed N/A line N/A readlines N/A N/A self hint N/A None N/A N/A result N/A N/A N/A N/A self pos N/A self length N/A N/A N/A N/A result append N/A N/A self readline N/A result N/A N/A