Search code examples
javaandroidpythonsslthrift

Example Apache Thrift service which uses HTTPS, in Python


I have been able to find examples for how to implement services using Apache Thrift which use SSL as transport .. in Java. But not in Python.

I would like to use Apache Thrift to generate the boilerplate code for calling services written in Python which will be called from Android. The transport needs to be HTTPS.

Any clues where I can find something like that?


Solution

  • I have used Thrift with PHP, Java and Python, and you may noticed the worst part of working with Thrift is its documentation. A part from de official example that is available in different languages: Official Source Code Tutorial. Here are a couple of webpages that describes more detailed how to implement a client/server thrift protocol:

    Securing your connection over SSL will imply to modify your server/client by adding a couple of new lines, here is an example in Java:

    It is not a tough task to rewrite the last code to python