Skip to content

Instantly share code, notes, and snippets.

@theho
Created June 12, 2016 12:36
Show Gist options
  • Save theho/f7dbdd04c8650483e9602bf1b3ed7481 to your computer and use it in GitHub Desktop.
Save theho/f7dbdd04c8650483e9602bf1b3ed7481 to your computer and use it in GitHub Desktop.
from cassandra.cluster import Cluster
from cassandra.auth import PlainTextAuthProvider
#
auth_provider = PlainTextAuthProvider(
username='jimmy', password='??????')
cluster = Cluster(contact_points=['dse1'], auth_provider=auth_provider)
session = cluster.connect()
#
result = session.execute("select * from test.kv")
for r in result:
print(r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment