Skip to main content

Http to thrift protocol conversion

Project description

https://travis-ci.org/elemepi/takumi-http.svg?branch=master

Use http client to call thrift services.

Example

App config:

# app.yaml
app_name: http_app
port: 1991
app: http_app:app
thrift_file: ping.thrift
thrift_protocol_class: takumi_http.protocol.HttpProtocol

App code:

# http_app.py

from takumi import Takumi

app = Takumi('PingService')

@app.api
def ping():
    return 'pong'

Start the service using takumi-cli.

$ takumi serve

Then open http://localhost:1991/ping in your brower.

Project details


Download files

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

Source Distribution

takumi_http-0.1.2.tar.gz (5.9 kB view hashes)

Uploaded source

Built Distribution

takumi_http-0.1.2-py2.py3-none-any.whl (8.7 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page