Skip to content
프로젝트

소개

thriftpy는 이제 https://github.com/Thriftpy/thriftpy2를 감싸는 얇은 래퍼일 뿐입니다.

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
-1
in 1 month
-2

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

ThriftPy

thriftpy is now a thin compatibility shim around thriftpy2.

Installing thriftpy installs the matching thriftpy2 release and re-exports it under the historical thriftpy package name. Existing code that uses import thriftpy can keep that import while running on the maintained thriftpy2 implementation.

For full documentation and usage details, use the thriftpy2 project: https://github.com/Thriftpy/thriftpy2

Background

For a while we did not have release access for the original thriftpy package, so active development moved to thriftpy2. thriftpy2 is the direct continuation of thriftpy; apart from the package name, it provides the same project and implementation.

After seeing that some users still depend on the thriftpy name, we recovered the needed release access and turned thriftpy into a shim around thriftpy2. Going forward, thriftpy and thriftpy2 are released in sync with the same version number, and users can choose either package name.

Installation

pip install thriftpy

Minimal Example

Given a pingpong.thrift file:

service PingPong {
    string ping(),
}

Server:

import thriftpy
from thriftpy.rpc import make_server

pingpong_thrift = thriftpy.load("pingpong.thrift", module_name="pingpong_thrift")

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

server = make_server(pingpong_thrift.PingPong, Dispatcher(), "127.0.0.1", 6000)
server.serve()

Client:

import thriftpy
from thriftpy.rpc import make_client

pingpong_thrift = thriftpy.load("pingpong.thrift", module_name="pingpong_thrift")

client = make_client(pingpong_thrift.PingPong, "127.0.0.1", 6000)
print(client.ping())

관련 프로젝트 살펴보기

불러오는 중…