takumi-http

Http to thrift protocol conversion


License
MIT
Install
pip install takumi-http==0.1.5

Documentation

takumi-http

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.