Skip to content

Instantly share code, notes, and snippets.

View brimcfadden's full-sized avatar
🍖

Brian McFadden brimcfadden

🍖
View GitHub Profile
#!/usr/bin/env python
import tornado.httpserver
import tornado.ioloop
import tornado.web
import multiprocessing
import random
import time
__author__ = 'Brian McFadden'
#!/usr/bin/env python
import tornado.httpclient
import tornado.httpserver
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
@tornado.web.asynchronous
def get(self):
@brimcfadden
brimcfadden / tornadoweb_stormed.py
Created August 16, 2011 21:34
Use stormed-amqp with tornado.web.RequestHandler
#!/usr/bin/env python
# tornadoweb_stormed.py
import logging
import sys
import stormed
import tornado.ioloop
import tornado.web
@brimcfadden
brimcfadden / tornadoweb_stormed.py
Created August 31, 2011 18:40
Use stormed-amqp with tornado.web.RequestHandlers
#!/usr/bin/env python
# tornadoweb_stormed.py
import logging
import sys
import stormed
import tornado.ioloop
import tornado.web
@brimcfadden
brimcfadden / tornadoweb_pika.py
Created June 1, 2012 22:33
Using Pika asynchronously with tornado.web.RequestHandler
#!/usr/bin/env python
"""A Tornado example of RPC.
Designed to work with rpc_server.py as found in RabbitMQ Tutorial #6:
http://www.rabbitmq.com/tutorials/tutorial-six-python.html
Some code is borrowed from pika's tornado example.
"""