thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HIRANO Satoshi <hiran...@aist.go.jp>
Subject Re: Integrating thrift with Python web framework (Django)
Date Wed, 16 Nov 2011 06:14:12 GMT
On 2011/11/16, at 14:23, Li Lirong wrote:
> Hi,
> 
> Thank you very much.  This is really helpful!

You are welcome.

The page says the point is this. 

   input_stream = self.request.environ['wsgi.input']
   output_stream = self.response.out

I used the sample in a test web app and it seems working on Google App Engine.

Have fun!

hirano

> On Wed, Nov 16, 2011 at 9:03 AM, HIRANO Satoshi <hirano-s@aist.go.jp> wrote:
>> 
>> On 2011/11/15, at 14:24, Li Lirong wrote:
>>> We are developing web application with Django (djangoproject.org).  Is
>>> there any tutorials on exposing thrift web services within the Django
>>> framework?
>> 
>> Hi,
>> 
>> Look at the following page. It explains how you run thrift on a WSGI framework. I'm
not sure you can do the same thing for Django, but Django is a WSGI framework.
>> 
>>  http://symfoware.blog68.fc2.com/blog-entry-320.html
>> 
>> It's written in Japanese. Look at sample code.
>> 
>> 1) Copy IOStreamTransport.py into thrift/transport.
>> 2) Compile sample.thrift
>> 3) Run main.py on python.
>> 4) Write a client. A sample is provided near the bottom of the page.
>> 
>> I think the IOStreamTransport.py should be included in the distribution package.
>> 
>> @@@@@@@@@@@@@@  Life is beautiful and full of surprises.
>> 
>> HIRANO Satoshi, Ph.D.         <hirano-s@aist.go.jp>
>> AIST: National Institute of Advanced Industrial Science and Technology  JAPAN
>> 
>> 
>> 

@@@@@@@@@@@@@@  Life is beautiful and full of surprises.

HIRANO Satoshi, Ph.D.         <hirano-s@aist.go.jp>
AIST: National Institute of Advanced Industrial Science and Technology

平野 聡   独立行政法人 産業技術総合研究所 情報技術研究部門
                 TEL 029-861-5166
                 産総研内 222-45166



Mime
View raw message