File: //opt/alt/python37/lib/python3.7/site-packages/paste/__pycache__/progress.cpython-37.pyc
B
a�N� � @ s� d Z ddlZddlmZ dZdZdZdZdZG d d
� d
e �Z
G dd� de �ZG d
d� de �ZddgZ
dekr�ddlZejejd� dS )a~
Upload Progress Monitor
This is a WSGI middleware component which monitors the status of files
being uploaded. It includes a small query application which will return
a list of all files being uploaded by particular session/user.
>>> from paste.httpserver import serve
>>> from paste.urlmap import URLMap
>>> from paste.auth.basic import AuthBasicHandler
>>> from paste.debug.debugapp import SlowConsumer, SimpleApplication
>>> # from paste.progress import *
>>> realm = 'Test Realm'
>>> def authfunc(username, password):
... return username == password
>>> map = URLMap({})
>>> ups = UploadProgressMonitor(map, threshold=1024)
>>> map['/upload'] = SlowConsumer()
>>> map['/simple'] = SimpleApplication()
>>> map['/report'] = UploadProgressReporter(ups)
>>> serve(AuthBasicHandler(ups, realm, authfunc))
serving on...
.. note::
This is experimental, and will change in the future.
� N)�catch_errorsi i, zpaste.bytes_receivedzpaste.request_startedzpaste.request_finishedc @ s<