Skip to main content
https://travis-ci.org/elemepi/takumi-thrift.svg?branch=master

Thriftpy instruments for passing metadata bidirectional.

Example

# Server
class Ctx(object):
    pass
ctx = Ctx()
ctx.response_meta = {'server': 'test'}

class Handler(object):
    def say_hello(name):
        assert ctx.meta == {'hello': 'test', 'client_name': 'test_client'}
        return Response('Hello ' + name, meta={'api': 'say_hello'})

processor = Processor(ctx, service, Handler())

# Client
client = Client(service, proto, meta={'client_name': 'test_client'})
res = client.call('say_hello', 'world', meta={'hello': 'test'})
assert res.meta == {'api': 'say_hello', 'server': 'test'}
assert res.value == 'Hello world'

Data frame change

Request data frame:

before: message_begin args message_end
after:  meta_begin meta meta_end message_begin args message_end

Response data frame:

before: message_begin result message_end
after:  meta_begin meta meta_end message_begin result message_end

Metadata

Release files for takumi-thrift 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for takumi-thrift 0.2.2
File Size Uploaded
takumi_thrift-0.2.2.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for takumi-thrift 0.2.2
File Interpreter ABI Platform
takumi_thrift-0.2.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 13.5 kB

Release files / takumi_thrift-0.2.2.tar.gz

Download URL takumi_thrift-0.2.2.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1d46002819be2a7f86a15a3644b8d9ab46199e2de30f8d37f4421d9eb3b5e57f
BLAKE2b-256 checksum
How to use checksums
68375f65ea74339e1979b7bbc0af91b9aa560c90fef86e5633583e1dff266ea1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.8.1 pkginfo/1.4.1 requests/2.13.0 setuptools/36.2.7 requests-toolbelt/0.7.1 clint/0.5.1 CPython/3.4.3 Darwin/16.7.0

Release files / takumi_thrift-0.2.2-py2.py3-none-any.whl

Download URL takumi_thrift-0.2.2-py2.py3-none-any.whl
Size 8.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
db973e5e19bc47fdcdd1c8c7771726c603c2dac214b51f54bb0f9fa693f0adae
BLAKE2b-256 checksum
How to use checksums
644e80e74a0b7f02bacdf9431e624771bb02090e5dcce6745f747e30e496c0a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.8.1 pkginfo/1.4.1 requests/2.13.0 setuptools/36.2.7 requests-toolbelt/0.7.1 clint/0.5.1 CPython/3.4.3 Darwin/16.7.0

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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