Frequently Asked Questions (FAQ)

FAQ

Can I use Faust with Django/Flask/etc.?

Yes! Use https://pypi.org/project/eventlet/ as a bridge to integrate with asyncio.

Using https://pypi.org/project/eventlet/

This approach works with any blocking Python library that can work with https://pypi.org/project/eventlet/.

Using https://pypi.org/project/eventlet/ requires you to install the https://pypi.org/project/faust-aioeventlet/ module, and you can install this as a bundle along with Faust:

$ pip install -U faust-streaming[eventlet]

Then to actually use eventlet as the event loop you have to either use the -L argument to the faust program:

$ faust -L eventlet -A myproj worker -l info

or add import mode.loop.eventlet at the top of your entry point script:

#!/usr/bin/env python3
import mode.loop.eventlet  # noqa

Warning

It’s very important this is at the very top of the module, and that it executes before you import libraries.

Can I use Faust with Tornado?

Yes! Use the tornado.platform.asyncio bridge: http://www.tornadoweb.org/en/stable/asyncio.html

Can I use Faust with Twisted?

Yes! Use the asyncio reactor implementation: https://twistedmatrix.com/documents/17.1.0/api/twisted.internet.asyncioreactor.html

Will you support Python 2.7 or Python 3.5?

No. Faust requires Python 3.8 or later, since it heavily uses features that were introduced in Python 3.6 (async, await, variable type annotations).

I get a maximum number of open files exceeded error by RocksDB when running a Faust app locally. How can I fix this?

You may need to increase the limit for the maximum number of open files. The following post explains how to do so on OS X: https://blog.dekstroza.io/ulimit-shenanigans-on-osx-el-capitan/

What kafka versions faust supports?

Faust supports kafka with version >= 0.10.