To get you startet the ESP8266 firmware has asyncio primitives from Peter Hinch included
asyn.py are requiered for Microhomie.
mqtt_as.py is a “resilient” asynchronous non-blocking MQTT driver. In Microhomie we use the patched version from Kevin Köck. Kevins version use keywords to initialize the mqtt_as object, support for “unsubscribe” and support for the unix port of MicroPython.