Skip to main content

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())

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thriftpy-0.7.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thriftpy-0.7.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file thriftpy-0.7.0.tar.gz.

File metadata

  • Download URL: thriftpy-0.7.0.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

Hashes for thriftpy-0.7.0.tar.gz
Algorithm Hash digest
SHA256 e91112857c3e0bdbc1a3dc7f51df132dcb1157fe17875d068670351e9d10d169
MD5 8d49a59bc420d1c4a7d01c4fd1f8cfa6
BLAKE2b-256 9505236450aaa53debb15fe992264dd74c6b287d7eb15519e77b95a42634f0dd

See more details on using hashes here.

File details

Details for the file thriftpy-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: thriftpy-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.13

File hashes

Hashes for thriftpy-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d01aa1d9302495e735d522d8d0096b9c55cfe4d90f10a3ad77c579a5ea16d37
MD5 aad736547409e646c8938f266334c157
BLAKE2b-256 a98f1e0a3ae42c9cc5ff62ce0e58813fb2b0621bc6ffcd2c99a72e280ad54704

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page