O'Reilly logo

Learning Apache Thrift by Krzysztof Rakowski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Python

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required