| Name | Type | Description |
|---|---|---|
collection_name* | str | name of the Astra DB collection to create/use. |
token | Optional[str] | Default: NoneAPI token for Astra DB usage. |
api_endpoint | Optional[str] | Default: None |
astra_db_client | Optional[AstraDB] | Default: None |
async_astra_db_client | Optional[AsyncAstraDB] | Default: None |
namespace | Optional[str] | Default: None |
setup_mode | SetupMode | Default: SetupMode.SYNC |
pre_delete_collection | bool | Default: False |
full URL to the API endpoint,
such as https://<DB-ID>-us-east1.apps.astra.datastax.com.
alternative to token+api_endpoint, you can pass an already-created 'astrapy.db.AstraDB' instance.
alternative to token+api_endpoint, you can pass an already-created 'astrapy.db.AsyncAstraDB' instance.
namespace (aka keyspace) where the collection is created. Defaults to the database's "default namespace".
mode used to create the Astra DB collection (SYNC, ASYNC or OFF).
whether to delete the collection before creating it. If False and the collection already exists, the collection will be used as is.