/usr/local/lib/python3.6/site-packages/werkzeug/middleware/__pycache__
NameSizeModeActions
dispatcher.cpython-36.pyc26960644editdlrm
http_proxy.cpython-36.pyc68030644editdlrm
lint.cpython-36.pyc127090644editdlrm
profiler.cpython-36.pyc48040644editdlrm
proxy_fix.cpython-36.pyc61030644editdlrm
shared_data.cpython-36.pyc98600644editdlrm
__init__.cpython-36.pyc6550644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/werkzeug/middleware/__pycache__/dispatcher.cpython-36.pyc (2696B)
3 _TBg @sHdZddlZejr6ddlmZddlmZddlmZGdddZdS)aY Application Dispatcher ====================== This middleware creates a single WSGI application that dispatches to multiple other WSGI applications mounted at different URL paths. A common example is writing a Single Page Application, where you have a backend API and a frontend written in JavaScript that does the routing in the browser rather than requesting different pages from the server. The frontend is a single HTML and JS file that should be served for any path besides "/api". This example dispatches to an API app under "/api", an admin app under "/admin", and an app that serves frontend files for all other requests:: app = DispatcherMiddleware(serve_frontend, { '/api': api_app, '/admin': admin_app, }) In production, you might instead handle this at the HTTP server level, serving files or proxying to application servers based on location. The API and admin apps would each be deployed with a separate WSGI server, and the static files would be served directly by the HTTP server. .. autoclass:: DispatcherMiddleware :copyright: 2007 Pallets :license: BSD-3-Clause N) StartResponse)WSGIApplication)WSGIEnvironmentc@sLeZdZdZd dejejedfddddZddej e d d d Z dS) DispatcherMiddlewareaJCombine multiple applications as a single WSGI application. Requests are dispatched to an application based on the path it is mounted under. :param app: The WSGI application to dispatch to if the request doesn't match a mounted path. :param mounts: Maps path prefixes to applications for dispatching. Nr)appmountsreturncCs||_|p i|_dS)N)rr)selfrrr B/tmp/pip-build-0s3hx122/Werkzeug/werkzeug/middleware/dispatcher.py__init__3szDispatcherMiddleware.__init__rr)environstart_responsercCs|jdd}d}xPd|krP||jkr0|j|}P|jdd\}}d||}qW|jj||j}|jdd}|||d<||d<|||S)NZ PATH_INFO/Z SCRIPT_NAME)getrrsplitr)r r rscriptZ path_inforZ last_itemZoriginal_script_namer r r __call__;s      zDispatcherMiddleware.__call__)N) __name__ __module__ __qualname____doc__tOptionalDictstrr Iterablebytesrr r r r r)s r) rZtypingrZ TYPE_CHECKINGZ_typeshed.wsgirrrrr r r r  s