Skip to main content

Werkzeug for asyncio

Project description

|travis-master| |coverall-master| |doc-master| |pypi-downloads| |pypi-lastrelease| |python-versions|
|project-status| |project-license| |project-format| |project-implementation|

.. |travis-master| image::

.. |coverall-master| image::

.. |doc-master| image::
:alt: Documentation Status

.. |pypi-downloads| image::
:alt: Downloads

.. |pypi-lastrelease| image::
:alt: Latest Version

.. |python-versions| image::
:alt: Supported Python versions

.. |project-status| image::
:alt: Development Status

.. |project-license| image::
:alt: License

.. |project-format| image::
:alt: Download format

.. |project-implementation| image::
:alt: Supported Python implementations


Library to make werkzeug working with asyncio.


* Locals work on asyncio Tasks. `werkzeug.local.Local` or `werkzeug.local.LocalStack` must be patched
with :func:`aiowerkzeug.local.patch_local`

Patched `werkzeug.local.Local` or `werkzeug.local.LocalStack` use current `asyncio.tasks.Task`
to determine context.

* Decorator factory to mark coroutines to run in a context. Useful for Flask. It allows to run corountines
in new `asyncio.tasks.Task` inside a specific context.

For example, in Flask to run coroutines in Application context it is possible to create a decorator like that:

.. code-block:: python

def _get_app_context():
return current_app.app_context()

app_coroutine = partial(context_coroutine, ctx=_get_app_context)

def foo_bar():

def caller():

* Asyncio HTTP server runner with reload

.. code-block:: bash

$ python aiowerkzeug/ --reload


* Form parser
* Debug middleware
* Static files middleware

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aiowerkzeug, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size aiowerkzeug-0.1.1.tar.gz (7.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page