This directory contains the mustache templates used to generate the thrift-py3 implementation. The thrift-py3 implementation wraps the cpp2 generator in Cython code that links the futures implementation of thrift with the asyncio library in Python. It requires Python 3.5.2 or higher. This implementation optimizes for speed by doing as little work inside the GIL as possible. Objects are stored in memory as C++ objects and are only converted to Python on demand. All serialization and deserialization happens outside the GIL. This means it's possible to pass extremely large structures into or out of the asyncio service without blocking the event loop. The Python facing side of the implementation uses immutable types to ensure all thrift types are hashable (and can therefore be used as keys in dictionaries or returned as exceptions). as a side effect, this also makes the task of wrapping the structs much simpler. We provide an elegant Pythonic API to manipulate the immutable types. HACKING ------- There are basically four types of files in this directory. See the documentation at the head of each file for more information. The actual driver that calls into these mustache files and generates the code lives in `thrift/compiler/generate/t_mstch_py3_generator.cc`. See `thrift/doc/mstch.md` for information on how to use the thrift mustache generators. Top level files --------------- These are files that are generated by the mstch_py3 generator and are included as part of the generated source distribution. They include: * types.pxd.mustache * types.pyx.mustache * services.pxd.mustache * services.pyx.mustache * services_wrapper.cpp.mustache * services_wrapper.h.mustache * services_wrapper.pxd.mustache * ClientsWrapper.cpp.mustache * clients.pxd.mustache * clients.pyx.mustache * clients_wrapper.cpp.mustache * clients_wrapper.h.mustache * clients_wrapper.pxd.mustache services/*.mustache Services included files clients/*.mustache Clients included files types/*.mustache Types include files common/*.mustache Common included files