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.1.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.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: thriftpy-0.7.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for thriftpy-0.7.1.tar.gz
Algorithm Hash digest
SHA256 3184291b35a1ec0eedb3f15361233012bbe2ac49435adea72eb45b650033ad3a
MD5 4461fb356bdffedc1329fc434851fd42
BLAKE2b-256 0c816b48ddf9b4f7ba863c026ebf6d61c2913f10d9d3676dcd0a2f1ebfa4e9f4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for thriftpy-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae580a854f58e5258b77a3f3b4973c0f37ddc72637d7132c5a14b375c80fa7a3
MD5 3ce8c0ea30ded92fbf380395537e2499
BLAKE2b-256 ab240be0a96a5a1333ac4a5074176000913586716f0931d003480114ce8ee7d5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 files

0.7.0

2 files

0.6.0

2 files

0.3.9

1 file

0.3.8

1 file

0.3.7

1 file

0.3.6

1 file

0.3.5

1 file

0.3.4

1 file

0.3.3

1 file

0.3.2

1 file

0.3.1

1 file

0.3.0

1 file

0.2.1

1 file

0.2.0

1 file

0.1.15

1 file

0.1.14

1 file

0.1.13

1 file

0.1.12

1 file

0.1.11

1 file

0.1.10

1 file

0.1.9

1 file

0.1.8

1 file

0.1.7

1 file

0.1.6

1 file

0.1.5

1 file

0.1.4

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page