Create thrift.py