CassandraBackend
Cassandra/AstraDB backend utilizing DataStax driver.
Attributes
| Attribute | Type | Description |
|---|---|---|
| servers | list = null | List of Cassandra servers with format: hostname. |
| bundle_path | string = null | Location of the secure connect bundle zipfile (absolute path). |
| supports_autoexpire | boolean = true | Indicates 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
| Name | Type | Description |
|---|---|---|
| servers | list = None | List of Cassandra server hostnames. |
| keyspace | string = None | The Cassandra keyspace to use. |
| table | string = None | The Cassandra table to use for storing results. |
| entry_ttl | int = None | Time-to-live for entries in the database. |
| port | int = None | The port number to connect to Cassandra. |
| bundle_path | string = None | Absolute path to the secure connect bundle zipfile for AstraDB. |
| **kwargs | dict | Additional 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
| Name | Type | Description |
|---|---|---|
| include_password | boolean = True | Determines whether sensitive credentials should be included in the resulting URI string. |
Returns
| Type | Description |
|---|---|
string | The connection string prefix 'cassandra://' used to identify this backend type. |