Hi I know I've asked this before but thought I would ask again in hope the status has changed or maybe others have had some success. Does flask work with websockets? I found this rather informative link....it's got everything I need.....except for flask :( http://blog.pythonisito.com/2011/07/gevent-zeromq-websockets-and-flot-ftw.html Any ideas? Thanks Bruce
Hi, WSGI does not support websockets but various servers have extensions to handle them. However most of the time you really only need push notifications and for that running a separate service like Juggernaut or outsourcing to pubnub etc. is the better option. Regards, Armin
I haven't used it, but Brubeck[1] looks like a nice way to deal with event architecture for the web. It uses 0mq to talk to mongrel2 and gevent for coroutines. You can run flask under the gevent WSGIServer but it is an ugly construction. [1] http://brubeck.io/ Grtz On Friday 30 December 2011 at 15:33, Armin Ronacher wrote: > Hi, > > WSGI does not support websockets but various servers have extensions to > handle them. However most of the time you really only need push > notifications and for that running a separate service like Juggernaut or > outsourcing to pubnub etc. is the better option. > > > Regards, > Armin
You can run the websockets service in another port. Take a look at ws4py https://github.com/Lawouach/WebSocket-for-Python 2011/12/30 Werner <el.lauwer@gmail.com>: > I haven't used it, but Brubeck[1] looks like a nice way to deal with event > architecture for the web. It uses 0mq to talk to mongrel2 and gevent for > coroutines. > > You can run flask under the gevent WSGIServer but it is an ugly > construction. > > [1] http://brubeck.io/ > > Grtz > > On Friday 30 December 2011 at 15:33, Armin Ronacher wrote: > > Hi, > > WSGI does not support websockets but various servers have extensions to > handle them. However most of the time you really only need push > notifications and for that running a separate service like Juggernaut or > outsourcing to pubnub etc. is the better option. > > > Regards, > Armin > >
Pusher is also another alternative if you are looking for a websocket sass provider. Pusher has a free, micro plan that allows you to try out their service. http://pusher.com 2011/12/30 Ernesto Menéndez <pyalec@gmail.com>: > You can run the websockets service in another port. Take a look at > ws4py https://github.com/Lawouach/WebSocket-for-Python > > > 2011/12/30 Werner <el.lauwer@gmail.com>: >> I haven't used it, but Brubeck[1] looks like a nice way to deal with event >> architecture for the web. It uses 0mq to talk to mongrel2 and gevent for >> coroutines. >> >> You can run flask under the gevent WSGIServer but it is an ugly >> construction. >> >> [1] http://brubeck.io/ >> >> Grtz >> >> On Friday 30 December 2011 at 15:33, Armin Ronacher wrote: >> >> Hi, >> >> WSGI does not support websockets but various servers have extensions to >> handle them. However most of the time you really only need push >> notifications and for that running a separate service like Juggernaut or >> outsourcing to pubnub etc. is the better option. >> >> >> Regards, >> Armin >> >>
Dear folks, Have anyone tried integrating a flask app with CAS? http://jasig.org/cas (FSF uses CAS for authentication) This will completely hand-over all session management etc. to CAS and we will have to manage only a SAML or similar call to CAS to authenticate. possible pblm: CAS runs on tomcat. Abdul
Le 06/01/2012 00:32, Abdul Bijur Vallarkodath a écrit : > Dear folks, > > Have anyone tried integrating a flask app with CAS?http://jasig.org/cas > (FSF uses CAS for authentication) > > This will completely hand-over all session management etc. to CAS and we > will have to manage only a SAML or similar call to CAS to authenticate. > > possible pblm: CAS runs on tomcat. Hi, It looks like CAS has client libraries in several languages, separated from the server. So the server running on tomcat is not a problem. http://www.jasig.org/cas/client-integration The thing is there is not official python client. Google shows some unofficial clients. One could write a Flask extension to integrate a client with Flask sessions. Regards, -- Simon Sapin
From this page: https://wiki.jasig.org/display/CASC/Pycas
|import| |pycas|
|CAS_SERVER = ||"https://casserver.mydomain"
<https://casserver.mydomain>|
|SERVICE_URL = ||"http://webserver.mydomain/cgi-bin/webapp.py"
<http://webserver.mydomain/cgi-bin/webapp.py>|
|status, id, cookie = login(CAS_SERVER, SERVICE_URL)|
||
|
The site could do this once and check sessions.
|
*status* carries the success or failure status.
*id* is the user's account name.
*cookie* is the header string to send to the client if it's not empty.
This should work well.
Regards,
Abdul
On 1/6/12 8:07 AM, Simon Sapin wrote:
> Le 06/01/2012 00:32, Abdul Bijur Vallarkodath a écrit :
>> Dear folks,
>>
>> Have anyone tried integrating a flask app with CAS?http://jasig.org/cas
>> (FSF uses CAS for authentication)
>>
>> This will completely hand-over all session management etc. to CAS and we
>> will have to manage only a SAML or similar call to CAS to authenticate.
>>
>> possible pblm: CAS runs on tomcat.
> Hi,
>
> It looks like CAS has client libraries in several languages, separated
> from the server. So the server running on tomcat is not a problem.
>
> http://www.jasig.org/cas/client-integration
>
> The thing is there is not official python client. Google shows some
> unofficial clients. One could write a Flask extension to integrate a
> client with Flask sessions.
>
> Regards,
Bruce, Maybe not directly. But check out Juggernaut… I have a demo if you'd like to see it in action: http://logger.conceptis.org/ also you've got the code on GitHub: https://github.com/maxcountryman/logmon Alternatively, check out gevent-websocket. HTH, Max On Dec 30, 2011, at 8:55 AM, bruce bushby wrote: > Hi > > I know I've asked this before but thought I would ask again in hope > the status has changed or maybe others have had some success. > > Does flask work with websockets? > > I found this rather informative link....it's got everything I > need.....except for flask :( > http://blog.pythonisito.com/2011/07/gevent-zeromq-websockets-and-flot-ftw.html > > Any ideas? > > Thanks > Bruce