Compatibility shim that exposes thriftpy2 under the historical thriftpy name.
Project description
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())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thriftpy-0.7.0a1.tar.gz.
File metadata
- Download URL: thriftpy-0.7.0a1.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9235fdaf09720795f753d258bcc39690317b3983f401c6801c7d732a4080cedb
|
|
| MD5 |
acb412ba49d4f641a4a7586f61fb8f20
|
|
| BLAKE2b-256 |
a4d111d64db852522c69fea93eedf880d5890aeb682ed2c2d1ef7cd435c10c7d
|
File details
Details for the file thriftpy-0.7.0a1-py3-none-any.whl.
File metadata
- Download URL: thriftpy-0.7.0a1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0ac8245943ed05996dac0d11d5d2b569fa225be8e7ab06459bab5ced4b04c6b
|
|
| MD5 |
2af0d0e01fbe82e78fbf612611b4a529
|
|
| BLAKE2b-256 |
392491e43425f80c00a6b4ddf4c606bcab4e3b86b90080a97452f1e0d56b7961
|