Python is used universally in server scripting, web and desktop applications, networking, natural language processing, statistical analysis, machine learning, and lots of other applications. This makes it a great tool for distributed applications with strong support in Apache Thrift.

Generating the code

Apache Thrift's compiler offers lots of options for Python. Run the following command to see them:

$ thrift --help 

Look for the information about Python generators:

  py (Python):
    new_style:       Generate new-style classes.
    twisted:         Generate Twisted-friendly RPC services.
    tornado:         Generate code for use with Tornado.
    utf8strings:     Encode/decode strings using utf8 in the generated code.
    slots:           Generate code using slots for instance members.

Get Learning Apache Thrift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.