Skip to main content

CassandraBackend

Cassandra/AstraDB backend utilizing DataStax driver.

Attributes

AttributeTypeDescription
serverslist = nullList of Cassandra servers with format: hostname.
bundle_pathstring = nullLocation of the secure connect bundle zipfile (absolute path).
supports_autoexpireboolean = trueIndicates that autoexpire is supported via entry_ttl.

Constructor

Signature

def CassandraBackend(
servers: list = None,
keyspace: string = None,
table: string = None,
entry_ttl: int = None,
port: int = None,
bundle_path: string = None,
**kwargs: dict
) - > null

Parameters

NameTypeDescription
serverslist = NoneList of Cassandra server hostnames.
keyspacestring = NoneThe Cassandra keyspace to use.
tablestring = NoneThe Cassandra table to use for storing results.
entry_ttlint = NoneTime-to-live for entries in the database.
portint = NoneThe port number to connect to Cassandra.
bundle_pathstring = NoneAbsolute path to the secure connect bundle zipfile for AstraDB.
**kwargsdictAdditional keyword arguments passed to the base backend.

Methods


as_uri()

@classmethod
def as_uri(
include_password: boolean = True
) - > string

Returns the URI representation of the Cassandra backend.

Parameters

NameTypeDescription
include_passwordboolean = TrueDetermines whether sensitive credentials should be included in the resulting URI string.

Returns

TypeDescription
stringThe connection string prefix 'cassandra://' used to identify this backend type.