Thrift 的 Python 版本 ThriftPy

码农软件 · 软件分类 · 网络工具包 · 2019-02-27 11:41:45

软件介绍

ThriftPy 是 Apache Thrift 的 Python 语言移植版本。

服务器端示例代码:

import thriftpy
from thriftpy.rpc import make_server

pingpong = thriftpy.load("pingpong.thrift")

class Dispatcher(object):
    def ping(self):
        return "pong"

server = make_server(pingpong.PingPong, Dispatcher(), '127.0.0.1', 6000)
server.serve()

客户端:

import thriftpy
from thrift.rpc import make_client

pingpong = thriftpy.load("pingpong.thrift")

client = make_client(pingpong.PingPong, '127.0.0.1', 6000)
client.ping()

本文地址:https://www.codercto.com/soft/d/239.html

算法设计与分析基础

算法设计与分析基础

乐威汀 (Anany Levitin) / 清华大学出版社 / 2003-8 / 39.00元

《算法设计与分析基础(影印版)》由清华大学出版社出版。一起来看看 《算法设计与分析基础》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

MD5 加密
MD5 加密

MD5 加密工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具