Skip to content

Instantly share code, notes, and snippets.

@eevans
Created September 3, 2010 15:05
Show Gist options
  • Save eevans/564000 to your computer and use it in GitHub Desktop.
Save eevans/564000 to your computer and use it in GitHub Desktop.
from cassandra import Cassandra
from cassandra.atypes import *
client = Cassandra.Client()
client.set_keyspace(keyspace='Keyspace1')
client.insert(key='keyAAA',
column_parent=ColumnParent(column_family='Standard2'),
column=Column(name='colAAA',
value='valAAA',
clock=Clock(timestamp=1),
ttl=0),
consistency_level='ONE')
cosc = client.get(key='keyAAA',
column_path=ColumnPath(column_family='Standard2',
column='colAAA'),
consistency_level='ONE')
print cosc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment