This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thomas Parslow http://almostobsolete.net | |
# Just a work in progress and adapted to what I need right now. | |
# It does uploads (via a file-like object that you write to) and | |
# I've started on downloads. Needs the development version of Boto from Github. | |
# | |
# Example: | |
# | |
# glacierconn = GlacierConnection(AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY) | |
# writer = GlacierWriter(glacierconn, GLACIER_VAULT) | |
# writer.write(somedata) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kombu import Exchange | |
from kombu import Queue | |
from kombu import BrokerConnection | |
class ProduceConsume(object): | |
def __init__(self, exchange_name, **options): | |
exchange = Exchange(exchange_name, type='fanout', durable=False) | |
queue_name = options.get('queue', exchange_name+'_queue') | |
self.queue = Queue(queue_name ,exchange) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node: | |
""" | |
>>> Node(1).append( | |
... Node(2)).append( | |
... Node(3)).append( | |
... Node(4)).append( | |
... Node(5)).append( | |
... Node(6)).append( | |
... Node(7)).append( | |
... Node(8)).pprint() |