# CassandraByteStore

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore)

A ByteStore implementation using Cassandra as the backend.

## Signature

```python
CassandraByteStore(
    self,
    table: str,
    *,
    session: Optional[Session] = None,
    keyspace: Optional[str] = None,
    setup_mode: SetupMode = SetupMode.SYNC,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `table` | `str` | Yes | The name of the table to use. |
| `session` | `Optional[Session]` | No | A Cassandra session object. If not provided, it will be resolved from the cassio config. (default: `None`) |
| `keyspace` | `Optional[str]` | No | The keyspace to use. If not provided, it will be resolved from the cassio config. (default: `None`) |
| `setup_mode` | `SetupMode` | No | The setup mode to use. Default is SYNC  (SetupMode.SYNC). (default: `SetupMode.SYNC`) |

## Extends

- `ByteStore`

## Constructors

```python
__init__(
    self,
    table: str,
    *,
    session: Optional[Session] = None,
    keyspace: Optional[str] = None,
    setup_mode: SetupMode = SetupMode.SYNC,
) -> None
```

| Name | Type |
|------|------|
| `table` | `str` |
| `session` | `Optional[Session]` |
| `keyspace` | `Optional[str]` |
| `setup_mode` | `SetupMode` |


## Properties

- `keyspace`
- `session`
- `table`
- `select_statement`
- `insert_statement`
- `delete_statement`
- `db_setup_task`

## Methods

- [`ensure_db_setup()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/ensure_db_setup)
- [`aensure_db_setup()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/aensure_db_setup)
- [`get_select_statement()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/get_select_statement)
- [`get_insert_statement()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/get_insert_statement)
- [`get_delete_statement()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/get_delete_statement)
- [`mget()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/mget)
- [`amget()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/amget)
- [`mset()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/mset)
- [`amset()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/amset)
- [`mdelete()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/mdelete)
- [`amdelete()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/amdelete)
- [`yield_keys()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/yield_keys)
- [`ayield_keys()`](https://reference.langchain.com/python/langchain-community/storage/cassandra/CassandraByteStore/ayield_keys)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/d5ea8358933260ad48dd31f7f8076555c7b4885a/libs/community/langchain_community/storage/cassandra.py#L37)