Thrfit版本0.9.3
安装
brew install https://gist.githubusercontent.com/chrislusf/8b4e7c19551ba220232f037b43c0eaf3/raw/01465b867b8ef9af7c7c3fa830c83666c825122d/thrift.rb
下载二进制包
wget https://www-us.apache.org/dist/thrift/0.9.3/thrift-0.9.3.tar.gz
tar -xzvf thrift-0.9.3.tar.gz
编译Thrift python运行库
cd lib/py
python setup.py build
python setup.py install
编译Thrift文件
cd tutorial/py
thrift --gen py -r ../shared.thrift
thrift --gen py -r ../tutorial.thrift
运行代码
python PythonServer.py
python PythonClient.py