Skip to content

Instantly share code, notes, and snippets.

@mgwilliams
Created September 20, 2011 17:54
Show Gist options
  • Save mgwilliams/1229789 to your computer and use it in GitHub Desktop.
Save mgwilliams/1229789 to your computer and use it in GitHub Desktop.
from twisted.application.internet import TCPClient
from telephus.protocol import ManagedCassandraClientFactory
from telephus.client import CassandraClient
class Service(TCPClient):
def __init__(self, keyspace=None, host="localhost", port=9160, delegate=None):
f = ManagedCassandraClientFactory(keyspace)
delegate.set_client(CassandraClient(f))
TCPClient.__init__(self, host, port, f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment