Was this page helpful?
ScyllaDB Python Driver is available under the Apache v2 License. ScyllaDB Python Driver is a fork of DataStax Python Driver. See Copyright here.
Caution
You're viewing documentation for a deprecated version of Scylla Python Driver. Switch to the latest stable version.
To connect to a DataStax Apollo cluster:
Download the secure connect bundle from your Apollo account.
Connect to your cluster with
from cassandra.cluster import Cluster
from cassandra.auth import PlainTextAuthProvider
cloud_config = {
'secure_connect_bundle': '/path/to/secure-connect-dbname.zip'
}
auth_provider = PlainTextAuthProvider(username='user', password='pass')
cluster = Cluster(cloud=cloud_config, auth_provider=auth_provider)
session = cluster.connect()
In most circumstances, the client code for interacting with an Apollo cluster will be the same as interacting with any other Cassandra cluster. The exceptions being:
A cloud configuration must be passed to a Cluster instance via the cloud attribute (as demonstrated above).
An SSL connection will be established automatically. Manual SSL configuration is not allowed, and using ssl_context or ssl_options will result in an exception.
A Cluster’s contact_points attribute should not be used. The cloud config contains all of the necessary contact information.
If a consistency level is not specified for an execution profile or query, then ConsistencyLevel.LOCAL_QUORUM will be used as the default.
Evenlet isn’t yet supported for python 3.7+ due to an issue in Eventlet.
Was this page helpful?
ScyllaDB Python Driver is available under the Apache v2 License. ScyllaDB Python Driver is a fork of DataStax Python Driver. See Copyright here.
cassandra - Exceptions and Enumscassandra.cluster - Clusters and Sessionscassandra.policies - Load balancing and Failure Handling Policiescassandra.auth - Authenticationcassandra.graph - Graph Statements, Options, and Row Factoriescassandra.metadata - Schema and Ring Topologycassandra.metrics - Performance Metricscassandra.query - Prepared Statements, Batch Statements, Tracing, and Row Factoriescassandra.pool - Hosts and Connection Poolscassandra.protocol - Protocol Featurescassandra.encoder - Encoders for non-prepared Statementscassandra.decoder - Data Return Formatscassandra.concurrent - Utilities for Concurrent Statement Executioncassandra.connection - Low Level Connection Infocassandra.util - Utilitiescassandra.timestamps - Timestamp Generationcassandra.io.asyncioreactor - asyncio Event Loopcassandra.io.asyncorereactor - asyncore Event Loopcassandra.io.eventletreactor - eventlet-compatible Connectioncassandra.io.libevreactor - libev Event Loopcassandra.io.geventreactor - gevent-compatible Event Loopcassandra.io.twistedreactor - Twisted Event Loopcassandra.cqlengine.models - Table models for object mappingcassandra.cqlengine.columns - Column types for object mapping modelscassandra.cqlengine.query - Query and filter model objectscassandra.cqlengine.connection - Connection management for cqlenginecassandra.cqlengine.management - Schema management for cqlenginecassandra.cqlengine.usertype - Model classes for User Defined Typescassandra.datastax.graph - Graph Statements, Options, and Row Factoriescassandra.datastax.graph.fluentcassandra.datastax.graph.fluent.querycassandra.datastax.graph.fluent.predicates