Re: [gevent] REAL HTTP streaming client library

206 views
Skip to first unread message

Benoit Chesneau

unread,
Aug 27, 2012, 7:19:58 AM8/27/12
to gev...@googlegroups.com


On Aug 27, 2012 1:11 PM, "grubberr" <grub...@gmail.com> wrote:
>
> Hello
>
> Does anybody know
> REAL HTTP streaming client library which can be used with gevent
> ( for consuming Twitter stream for example )
>
> for time being I  found that really streaming in nature only
> pycurl ( of course I cannot use it with gevent )
>
> here is simple streaming server
> https://gist.github.com/3487401
>
> we can consume data from this server with help of curl such way
> curl -N http://localhost:8080
> ( pycurl also works ok )
>
> to meet my needs python library has to connect to server and
> iteratively (without buffing ) consume one tick per second
>
> I saw hacks to use urllib(2) and set buffer size to 1 byte
> socket.read(1)
> but this is not what I want
>
> python library has to use socket.recv
> call which can return as much data as it gets from socket
>
> Thanks in advance for help !

Maybe mine: http://gunicorn.org/benoitc/http-parser

- benoît

Benoit Chesneau

unread,
Aug 27, 2012, 7:22:37 AM8/27/12
to gev...@googlegroups.com


On Aug 27, 2012 1:19 PM, "Benoit Chesneau" <bche...@gmail.com> wrote:
>
>
> On Aug 27, 2012 1:11 PM, "grubberr" <grub...@gmail.com> wrote:
> >
> > Hello
> >
> > Does anybody know
> > REAL HTTP streaming client library which can be used with gevent
> > ( for consuming Twitter stream for example )
> >
> > for time being I  found that really streaming in nature only
> > pycurl ( of course I cannot use it with gevent )
> >
> > here is simple streaming server
> > https://gist.github.com/3487401
> >
> > we can consume data from this server with help of curl such way
> > curl -N http://localhost:8080
> > ( pycurl also works ok )
> >
> > to meet my needs python library has to connect to server and
> > iteratively (without buffing ) consume one tick per second
> >
> > I saw hacks to use urllib(2) and set buffer size to 1 byte
> > socket.read(1)
> > but this is not what I want
> >
> > python library has to use socket.recv

> > call which can return as much data as it gets Maybe from socket


> >
> > Thanks in advance for help !
>

I meant http://github.com/benoitc/http-parser

Reply all
Reply to author
Forward
0 new messages