id stringlengths 7 77 | text stringlengths 0 3.4k | metadata dict |
|---|---|---|
astrapy.admin.check_id_endpoint_parg_kwargs | Utility function helping with the transition to endpoint-first constructors,
with ID being the other possibility.
It is called with the positional argument, the api_endpoint and id kwargs: it
then verifies legitimacy and returns a normalized (endpoint, id) "either" value.
Note: this uses the ID regexp to recognize ID... | {
"kind": "function",
"name": "check_id_endpoint_parg_kwargs",
"path": "astrapy.admin.check_id_endpoint_parg_kwargs",
"parameters": [
{
"name": "p_arg",
"type": "str | None",
"description": null,
"default": null,
"value": null
},
{
"name": "api_endpoint",
"t... |
astrapy.admin.fetch_raw_database_info_from_id_token | Fetch database information through the DevOps API and return it in
full, exactly like the API gives it back. | {
"kind": "function",
"name": "fetch_raw_database_info_from_id_token",
"path": "astrapy.admin.fetch_raw_database_info_from_id_token",
"parameters": [
{
"name": "id",
"type": "str",
"description": "e. g. \"01234567-89ab-cdef-0123-456789abcdef\".",
"default": null,
"value": null
... |
astrapy.admin.async_fetch_raw_database_info_from_id_token | Fetch database information through the DevOps API and return it in
full, exactly like the API gives it back.
Async version of the function, for use in an asyncio context. | {
"kind": "function",
"name": "async_fetch_raw_database_info_from_id_token",
"path": "astrapy.admin.async_fetch_raw_database_info_from_id_token",
"parameters": [
{
"name": "id",
"type": "str",
"description": "e. g. \"01234567-89ab-cdef-0123-456789abcdef\".",
"default": null,
"v... |
astrapy.admin.fetch_database_info | Fetch database information through the DevOps API. | {
"kind": "function",
"name": "fetch_database_info",
"path": "astrapy.admin.fetch_database_info",
"parameters": [
{
"name": "api_endpoint",
"type": "str",
"description": "a full API endpoint for the Data API.",
"default": null,
"value": null
},
{
"name": "token",
... |
astrapy.admin.async_fetch_database_info | Fetch database information through the DevOps API.
Async version of the function, for use in an asyncio context. | {
"kind": "function",
"name": "async_fetch_database_info",
"path": "astrapy.admin.async_fetch_database_info",
"parameters": [
{
"name": "api_endpoint",
"type": "str",
"description": "a full API endpoint for the Data API.",
"default": null,
"value": null
},
{
"name... |
astrapy.admin.normalize_region_for_id | {
"kind": "function",
"name": "normalize_region_for_id",
"path": "astrapy.admin.normalize_region_for_id",
"parameters": [
{
"name": "database_id",
"type": "str",
"description": null,
"default": null,
"value": null
},
{
"name": "token_str",
"type": "str | Non... | |
astrapy.admin.AstraDBAdmin | An "admin" object, able to perform administrative tasks at the databases
level, such as creating, listing or dropping databases. | {
"kind": "class",
"name": "AstraDBAdmin",
"path": "astrapy.admin.AstraDBAdmin",
"parameters": [
{
"name": "token",
"type": "str | TokenProvider | None",
"description": "an access token with enough permission to perform admin tasks.\nThis can be either a literal token string or a subclass ... |
astrapy.admin.AstraDBAdmin.token_provider | {
"kind": "attribute",
"name": "token_provider",
"path": "astrapy.admin.AstraDBAdmin.token_provider",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "token_provider = coerce_token_provider(token)",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"export... | |
astrapy.admin.AstraDBAdmin.environment | {
"kind": "attribute",
"name": "environment",
"path": "astrapy.admin.AstraDBAdmin.environment",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.constants.Environment",
"PROD"
],
"value": "environment = environment or Environment.PROD.lower()",
"yields": null,
"imports": nul... | |
astrapy.admin.AstraDBAdmin.dev_ops_url | {
"kind": "attribute",
"name": "dev_ops_url",
"path": "astrapy.admin.AstraDBAdmin.dev_ops_url",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.defaults.DEV_OPS_URL_ENV_MAP"
],
"value": "dev_ops_url = DEV_OPS_URL_ENV_MAP[self.environment]",
"yields": null,
"imports": null,
"p... | |
astrapy.admin.AstraDBAdmin.callers | {
"kind": "attribute",
"name": "callers",
"path": "astrapy.admin.AstraDBAdmin.callers",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "callers = callers_param",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"refe... | |
astrapy.admin.AstraDBAdmin.with_options | Create a clone of this AstraDBAdmin with some changed attributes. | {
"kind": "function",
"name": "with_options",
"path": "astrapy.admin.AstraDBAdmin.with_options",
"parameters": [
{
"name": "token",
"type": "str | TokenProvider | None",
"description": "an Access Token to the database. Example: `\"AstraCS:xyz...\"`.\nThis can be either a literal token stri... |
astrapy.admin.AstraDBAdmin.set_caller | Set a new identity for the application/framework on behalf of which
the DevOps API calls will be performed (the "caller").
New objects spawned from this client afterwards will inherit the new settings. | {
"kind": "function",
"name": "set_caller",
"path": "astrapy.admin.AstraDBAdmin.set_caller",
"parameters": [
{
"name": "caller_name",
"type": "str | None",
"description": "name of the application, or framework, on behalf of which\nthe DevOps API calls are performed. This ends up in the req... |
astrapy.admin.AstraDBAdmin.list_databases | Get the list of databases, as obtained with a request to the DevOps API. | {
"kind": "function",
"name": "list_databases",
"path": "astrapy.admin.AstraDBAdmin.list_databases",
"parameters": [
{
"name": "include",
"type": "str | None",
"description": "a filter on what databases are to be returned. As per\nDevOps API, defaults to \"nonterminated\". Pass \"all\" to ... |
astrapy.admin.AstraDBAdmin.async_list_databases | Get the list of databases, as obtained with a request to the DevOps API.
Async version of the method, for use in an asyncio context. | {
"kind": "function",
"name": "async_list_databases",
"path": "astrapy.admin.AstraDBAdmin.async_list_databases",
"parameters": [
{
"name": "include",
"type": "str | None",
"description": "a filter on what databases are to be returned. As per\nDevOps API, defaults to \"nonterminated\". Pass... |
astrapy.admin.AstraDBAdmin.database_info | Get the full information on a given database, through a request to the DevOps API. | {
"kind": "function",
"name": "database_info",
"path": "astrapy.admin.AstraDBAdmin.database_info",
"parameters": [
{
"name": "id",
"type": "str",
"description": "the ID of the target database, e. g.\n\"01234567-89ab-cdef-0123-456789abcdef\".",
"default": null,
"value": null
... |
astrapy.admin.AstraDBAdmin.async_database_info | Get the full information on a given database, through a request to the DevOps API.
This is an awaitable method suitable for use within an asyncio event loop. | {
"kind": "function",
"name": "async_database_info",
"path": "astrapy.admin.AstraDBAdmin.async_database_info",
"parameters": [
{
"name": "id",
"type": "str",
"description": "the ID of the target database, e. g.\n\"01234567-89ab-cdef-0123-456789abcdef\".",
"default": null,
"valu... |
astrapy.admin.AstraDBAdmin.create_database | Create a database as requested, optionally waiting for it to be ready. | {
"kind": "function",
"name": "create_database",
"path": "astrapy.admin.AstraDBAdmin.create_database",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the desired name for the database.",
"default": null,
"value": null
},
{
"name": "cloud_provider... |
astrapy.admin.AstraDBAdmin.async_create_database | Create a database as requested, optionally waiting for it to be ready.
This is an awaitable method suitable for use within an asyncio event loop. | {
"kind": "function",
"name": "async_create_database",
"path": "astrapy.admin.AstraDBAdmin.async_create_database",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the desired name for the database.",
"default": null,
"value": null
},
{
"name": "cl... |
astrapy.admin.AstraDBAdmin.drop_database | Drop a database, i.e. delete it completely and permanently with all its data. | {
"kind": "function",
"name": "drop_database",
"path": "astrapy.admin.AstraDBAdmin.drop_database",
"parameters": [
{
"name": "id",
"type": "str",
"description": "The ID of the database to drop, e. g.\n\"01234567-89ab-cdef-0123-456789abcdef\".",
"default": null,
"value": null
... |
astrapy.admin.AstraDBAdmin.async_drop_database | Drop a database, i.e. delete it completely and permanently with all its data.
Async version of the method, for use in an asyncio context. | {
"kind": "function",
"name": "async_drop_database",
"path": "astrapy.admin.AstraDBAdmin.async_drop_database",
"parameters": [
{
"name": "id",
"type": "str",
"description": "The ID of the database to drop, e. g.\n\"01234567-89ab-cdef-0123-456789abcdef\".",
"default": null,
"val... |
astrapy.admin.AstraDBAdmin.get_database_admin | Create an AstraDBDatabaseAdmin object for admin work within a certain database. | {
"kind": "function",
"name": "get_database_admin",
"path": "astrapy.admin.AstraDBAdmin.get_database_admin",
"parameters": [
{
"name": "api_endpoint_or_id",
"type": "str | None",
"description": "positional parameter that can stand for both\n`api_endpoint` and `id`. Passing them together is... |
astrapy.admin.AstraDBAdmin.get_database | Create a Database instance for a specific database, to be used
when doing data-level work (such as creating/managing collections). | {
"kind": "function",
"name": "get_database",
"path": "astrapy.admin.AstraDBAdmin.get_database",
"parameters": [
{
"name": "api_endpoint_or_id",
"type": "str | None",
"description": "positional parameter that can stand for both\n`api_endpoint` and `id`. Passing them together is an error.",... |
astrapy.admin.AstraDBAdmin.get_async_database | Create an AsyncDatabase instance for a specific database, to be used
when doing data-level work (such as creating/managing collections). | {
"kind": "function",
"name": "get_async_database",
"path": "astrapy.admin.AstraDBAdmin.get_async_database",
"parameters": [
{
"name": "api_endpoint_or_id",
"type": "str | None",
"description": "positional parameter that can stand for both\n`api_endpoint` and `id`. Passing them together is... |
astrapy.admin.DatabaseAdmin | An abstract class defining the interface for a database admin object.
This supports generic keyspace crud, as well as spawning databases,
without committing to a specific database architecture (e.g. Astra DB). | {
"kind": "class",
"name": "DatabaseAdmin",
"path": "astrapy.admin.DatabaseAdmin",
"parameters": null,
"returns": null,
"gathered_types": [
"ABC"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": [
"ABC"
],
"exports": null,
"example": null,
"referenc... |
astrapy.admin.DatabaseAdmin.environment | {
"kind": "attribute",
"name": "environment",
"path": "astrapy.admin.DatabaseAdmin.environment",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "environment: str",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"re... | |
astrapy.admin.DatabaseAdmin.spawner_database | {
"kind": "attribute",
"name": "spawner_database",
"path": "astrapy.admin.DatabaseAdmin.spawner_database",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.database.Database",
"astrapy.database.AsyncDatabase"
],
"value": "spawner_database: Database | AsyncDatabase",
"yields": ... | |
astrapy.admin.DatabaseAdmin.list_namespaces | Get a list of namespaces for the database. | {
"kind": "function",
"name": "list_namespaces",
"path": "astrapy.admin.DatabaseAdmin.list_namespaces",
"parameters": [
{
"name": "pargs",
"type": "Any",
"description": null,
"default": "()",
"value": null
},
{
"name": "kwargs",
"type": "Any",
"descrip... |
astrapy.admin.DatabaseAdmin.list_keyspaces | Get a list of keyspaces for the database. | {
"kind": "function",
"name": "list_keyspaces",
"path": "astrapy.admin.DatabaseAdmin.list_keyspaces",
"parameters": [
{
"name": "pargs",
"type": "Any",
"description": null,
"default": "()",
"value": null
},
{
"name": "kwargs",
"type": "Any",
"descripti... |
astrapy.admin.DatabaseAdmin.create_namespace | Create a namespace in the database, returning {'ok': 1} if successful. | {
"kind": "function",
"name": "create_namespace",
"path": "astrapy.admin.DatabaseAdmin.create_namespace",
"parameters": [
{
"name": "name",
"type": "str",
"description": null,
"default": null,
"value": null
},
{
"name": "update_db_keyspace",
"type": "bool | ... |
astrapy.admin.DatabaseAdmin.create_keyspace | Create a keyspace in the database, returning {'ok': 1} if successful. | {
"kind": "function",
"name": "create_keyspace",
"path": "astrapy.admin.DatabaseAdmin.create_keyspace",
"parameters": [
{
"name": "name",
"type": "str",
"description": null,
"default": null,
"value": null
},
{
"name": "update_db_keyspace",
"type": "bool | No... |
astrapy.admin.DatabaseAdmin.drop_namespace | Drop (delete) a namespace from the database, returning {'ok': 1} if successful. | {
"kind": "function",
"name": "drop_namespace",
"path": "astrapy.admin.DatabaseAdmin.drop_namespace",
"parameters": [
{
"name": "name",
"type": "str",
"description": null,
"default": null,
"value": null
},
{
"name": "pargs",
"type": "Any",
"description... |
astrapy.admin.DatabaseAdmin.drop_keyspace | Drop (delete) a keyspace from the database, returning {'ok': 1} if successful. | {
"kind": "function",
"name": "drop_keyspace",
"path": "astrapy.admin.DatabaseAdmin.drop_keyspace",
"parameters": [
{
"name": "name",
"type": "str",
"description": null,
"default": null,
"value": null
},
{
"name": "pargs",
"type": "Any",
"description":... |
astrapy.admin.DatabaseAdmin.async_list_namespaces | Get a list of namespaces for the database.
(Async version of the method.) | {
"kind": "function",
"name": "async_list_namespaces",
"path": "astrapy.admin.DatabaseAdmin.async_list_namespaces",
"parameters": [
{
"name": "pargs",
"type": "Any",
"description": null,
"default": "()",
"value": null
},
{
"name": "kwargs",
"type": "Any",
... |
astrapy.admin.DatabaseAdmin.async_list_keyspaces | Get a list of keyspaces for the database.
(Async version of the method.) | {
"kind": "function",
"name": "async_list_keyspaces",
"path": "astrapy.admin.DatabaseAdmin.async_list_keyspaces",
"parameters": [
{
"name": "pargs",
"type": "Any",
"description": null,
"default": "()",
"value": null
},
{
"name": "kwargs",
"type": "Any",
... |
astrapy.admin.DatabaseAdmin.async_create_namespace | Create a namespace in the database, returning {'ok': 1} if successful.
(Async version of the method.) | {
"kind": "function",
"name": "async_create_namespace",
"path": "astrapy.admin.DatabaseAdmin.async_create_namespace",
"parameters": [
{
"name": "name",
"type": "str",
"description": null,
"default": null,
"value": null
},
{
"name": "update_db_keyspace",
"typ... |
astrapy.admin.DatabaseAdmin.async_create_keyspace | Create a keyspace in the database, returning {'ok': 1} if successful.
(Async version of the method.) | {
"kind": "function",
"name": "async_create_keyspace",
"path": "astrapy.admin.DatabaseAdmin.async_create_keyspace",
"parameters": [
{
"name": "name",
"type": "str",
"description": null,
"default": null,
"value": null
},
{
"name": "update_db_keyspace",
"type"... |
astrapy.admin.DatabaseAdmin.async_drop_namespace | Drop (delete) a namespace from the database, returning {'ok': 1} if successful.
(Async version of the method.) | {
"kind": "function",
"name": "async_drop_namespace",
"path": "astrapy.admin.DatabaseAdmin.async_drop_namespace",
"parameters": [
{
"name": "name",
"type": "str",
"description": null,
"default": null,
"value": null
},
{
"name": "pargs",
"type": "Any",
... |
astrapy.admin.DatabaseAdmin.async_drop_keyspace | Drop (delete) a keyspace from the database, returning {'ok': 1} if successful.
(Async version of the method.) | {
"kind": "function",
"name": "async_drop_keyspace",
"path": "astrapy.admin.DatabaseAdmin.async_drop_keyspace",
"parameters": [
{
"name": "name",
"type": "str",
"description": null,
"default": null,
"value": null
},
{
"name": "pargs",
"type": "Any",
"d... |
astrapy.admin.DatabaseAdmin.get_database | Get a Database object from this database admin. | {
"kind": "function",
"name": "get_database",
"path": "astrapy.admin.DatabaseAdmin.get_database",
"parameters": [
{
"name": "pargs",
"type": "Any",
"description": null,
"default": "()",
"value": null
},
{
"name": "kwargs",
"type": "Any",
"description":... |
astrapy.admin.DatabaseAdmin.get_async_database | Get an AsyncDatabase object from this database admin. | {
"kind": "function",
"name": "get_async_database",
"path": "astrapy.admin.DatabaseAdmin.get_async_database",
"parameters": [
{
"name": "pargs",
"type": "Any",
"description": null,
"default": "()",
"value": null
},
{
"name": "kwargs",
"type": "Any",
"d... |
astrapy.admin.DatabaseAdmin.find_embedding_providers | Query the Data API for the available embedding providers. | {
"kind": "function",
"name": "find_embedding_providers",
"path": "astrapy.admin.DatabaseAdmin.find_embedding_providers",
"parameters": [
{
"name": "pargs",
"type": "Any",
"description": null,
"default": "()",
"value": null
},
{
"name": "kwargs",
"type": "An... |
astrapy.admin.DatabaseAdmin.async_find_embedding_providers | Query the Data API for the available embedding providers.
(Async version of the method.) | {
"kind": "function",
"name": "async_find_embedding_providers",
"path": "astrapy.admin.DatabaseAdmin.async_find_embedding_providers",
"parameters": [
{
"name": "pargs",
"type": "Any",
"description": null,
"default": "()",
"value": null
},
{
"name": "kwargs",
... |
astrapy.admin.AstraDBDatabaseAdmin | An "admin" object, able to perform administrative tasks at the keyspaces level
(i.e. within a certain database), such as creating/listing/dropping keyspaces.
This is one layer below the AstraDBAdmin concept, in that it is tied to
a single database and enables admin work within it. As such, it is generally
created by a... | {
"kind": "class",
"name": "AstraDBDatabaseAdmin",
"path": "astrapy.admin.AstraDBDatabaseAdmin",
"parameters": [
{
"name": "api_endpoint",
"type": "str",
"description": "the API Endpoint for the target database\n(e.g. `https://<ID>-<REGION>.apps.astra.datastax.com`).\nThe database must exi... |
astrapy.admin.AstraDBDatabaseAdmin.token_provider | {
"kind": "attribute",
"name": "token_provider",
"path": "astrapy.admin.AstraDBDatabaseAdmin.token_provider",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "token_provider = coerce_token_provider(token)",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
... | |
astrapy.admin.AstraDBDatabaseAdmin.environment | {
"kind": "attribute",
"name": "environment",
"path": "astrapy.admin.AstraDBDatabaseAdmin.environment",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.constants.Environment",
"PROD"
],
"value": "environment = environment or Environment.PROD.lower()",
"yields": null,
"impor... | |
astrapy.admin.AstraDBDatabaseAdmin.api_endpoint | {
"kind": "attribute",
"name": "api_endpoint",
"path": "astrapy.admin.AstraDBDatabaseAdmin.api_endpoint",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "api_endpoint = api_endpoint",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"e... | |
astrapy.admin.AstraDBDatabaseAdmin.callers | {
"kind": "attribute",
"name": "callers",
"path": "astrapy.admin.AstraDBDatabaseAdmin.callers",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "callers = callers_param",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,... | |
astrapy.admin.AstraDBDatabaseAdmin.api_path | {
"kind": "attribute",
"name": "api_path",
"path": "astrapy.admin.AstraDBDatabaseAdmin.api_path",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.defaults.API_PATH_ENV_MAP"
],
"value": "api_path = api_path if api_path is not None else API_PATH_ENV_MAP[self.environment]",
"yields"... | |
astrapy.admin.AstraDBDatabaseAdmin.api_version | {
"kind": "attribute",
"name": "api_version",
"path": "astrapy.admin.AstraDBDatabaseAdmin.api_version",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.defaults.API_VERSION_ENV_MAP"
],
"value": "api_version = api_version if api_version is not None else API_VERSION_ENV_MAP[self.envi... | |
astrapy.admin.AstraDBDatabaseAdmin.spawner_database | {
"kind": "attribute",
"name": "spawner_database",
"path": "astrapy.admin.AstraDBDatabaseAdmin.spawner_database",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "spawner_database = spawner_database",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"expo... | |
astrapy.admin.AstraDBDatabaseAdmin.dev_ops_url | {
"kind": "attribute",
"name": "dev_ops_url",
"path": "astrapy.admin.AstraDBDatabaseAdmin.dev_ops_url",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.defaults.DEV_OPS_URL_ENV_MAP"
],
"value": "dev_ops_url = dev_ops_url if dev_ops_url is not None else DEV_OPS_URL_ENV_MAP[self.envi... | |
astrapy.admin.AstraDBDatabaseAdmin.dev_ops_api_version | {
"kind": "attribute",
"name": "dev_ops_api_version",
"path": "astrapy.admin.AstraDBDatabaseAdmin.dev_ops_api_version",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.defaults.DEV_OPS_VERSION_ENV_MAP"
],
"value": "dev_ops_api_version = dev_ops_api_version if dev_ops_api_version is... | |
astrapy.admin.AstraDBDatabaseAdmin.with_options | Create a clone of this AstraDBDatabaseAdmin with some changed attributes. | {
"kind": "function",
"name": "with_options",
"path": "astrapy.admin.AstraDBDatabaseAdmin.with_options",
"parameters": [
{
"name": "api_endpoint",
"type": "str | None",
"description": "the API Endpoint for the target database\n(e.g. `https://<ID>-<REGION>.apps.astra.datastax.com`).\nThe da... |
astrapy.admin.AstraDBDatabaseAdmin.set_caller | Set a new identity for the application/framework on behalf of which
the DevOps API calls will be performed (the "caller").
New objects spawned from this client afterwards will inherit the new settings. | {
"kind": "function",
"name": "set_caller",
"path": "astrapy.admin.AstraDBDatabaseAdmin.set_caller",
"parameters": [
{
"name": "caller_name",
"type": "str | None",
"description": "name of the application, or framework, on behalf of which\nthe DevOps API calls are performed. This ends up in... |
astrapy.admin.AstraDBDatabaseAdmin.id | The ID of this database admin. | {
"kind": "attribute",
"name": "id",
"path": "astrapy.admin.AstraDBDatabaseAdmin.id",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "id: str",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": ">>> my_db_admin.id\n'01234567-... |
astrapy.admin.AstraDBDatabaseAdmin.region | The region for this database admin. | {
"kind": "attribute",
"name": "region",
"path": "astrapy.admin.AstraDBDatabaseAdmin.region",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "region: str",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": ">>> my_db_admin.re... |
astrapy.admin.AstraDBDatabaseAdmin.from_astra_db_admin | Create an AstraDBDatabaseAdmin from an AstraDBAdmin and an API Endpoint. | {
"kind": "function",
"name": "from_astra_db_admin",
"path": "astrapy.admin.AstraDBDatabaseAdmin.from_astra_db_admin",
"parameters": [
{
"name": "api_endpoint",
"type": "str",
"description": "the API Endpoint for the target database\n(e.g. `https://<ID>-<REGION>.apps.astra.datastax.com`).\... |
astrapy.admin.AstraDBDatabaseAdmin.from_api_endpoint | Create an AstraDBDatabaseAdmin from an API Endpoint and optionally a token. | {
"kind": "function",
"name": "from_api_endpoint",
"path": "astrapy.admin.AstraDBDatabaseAdmin.from_api_endpoint",
"parameters": [
{
"name": "api_endpoint",
"type": "str",
"description": "the API Endpoint for the target database\n(e.g. `https://<ID>-<REGION>.apps.astra.datastax.com`).\nThe... |
astrapy.admin.AstraDBDatabaseAdmin.info | Query the DevOps API for the full info on this database. | {
"kind": "function",
"name": "info",
"path": "astrapy.admin.AstraDBDatabaseAdmin.info",
"parameters": [
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the DevOps API request.",
"default": "None",
"value": "None"
}
],
"ret... |
astrapy.admin.AstraDBDatabaseAdmin.async_info | Query the DevOps API for the full info on this database.
Async version of the method, for use in an asyncio context. | {
"kind": "function",
"name": "async_info",
"path": "astrapy.admin.AstraDBDatabaseAdmin.async_info",
"parameters": [
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the DevOps API request.",
"default": "None",
"value": "None"
}... |
astrapy.admin.AstraDBDatabaseAdmin.list_namespaces | Query the DevOps API for a list of the namespaces in the database.
*DEPRECATED* (removal in 2.0). Switch to the "list_keyspaces" method.** | {
"kind": "function",
"name": "list_namespaces",
"path": "astrapy.admin.AstraDBDatabaseAdmin.list_namespaces",
"parameters": [
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the DevOps API request.",
"default": "None",
"value": "N... |
astrapy.admin.AstraDBDatabaseAdmin.list_keyspaces | Query the DevOps API for a list of the keyspaces in the database. | {
"kind": "function",
"name": "list_keyspaces",
"path": "astrapy.admin.AstraDBDatabaseAdmin.list_keyspaces",
"parameters": [
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the DevOps API request.",
"default": "None",
"value": "Non... |
astrapy.admin.AstraDBDatabaseAdmin.async_list_namespaces | Query the DevOps API for a list of the namespaces in the database.
Async version of the method, for use in an asyncio context.
*DEPRECATED* (removal in 2.0). Switch to the "keyspace" property.** | {
"kind": "function",
"name": "async_list_namespaces",
"path": "astrapy.admin.AstraDBDatabaseAdmin.async_list_namespaces",
"parameters": [
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the DevOps API request.",
"default": "None",
... |
astrapy.admin.AstraDBDatabaseAdmin.async_list_keyspaces | Query the DevOps API for a list of the keyspaces in the database.
Async version of the method, for use in an asyncio context. | {
"kind": "function",
"name": "async_list_keyspaces",
"path": "astrapy.admin.AstraDBDatabaseAdmin.async_list_keyspaces",
"parameters": [
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the DevOps API request.",
"default": "None",
"... |
astrapy.admin.AstraDBDatabaseAdmin.create_namespace | Create a namespace in this database as requested,
optionally waiting for it to be ready.
*DEPRECATED* (removal in 2.0). Switch to the "keyspace" property.** | {
"kind": "function",
"name": "create_namespace",
"path": "astrapy.admin.AstraDBDatabaseAdmin.create_namespace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the namespace name. If supplying a namespace that exists\nalready, the method call proceeds as usual, no errors ... |
astrapy.admin.AstraDBDatabaseAdmin.create_keyspace | Create a keyspace in this database as requested,
optionally waiting for it to be ready. | {
"kind": "function",
"name": "create_keyspace",
"path": "astrapy.admin.AstraDBDatabaseAdmin.create_keyspace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the keyspace name. If supplying a keyspace that exists\nalready, the method call proceeds as usual, no errors are\... |
astrapy.admin.AstraDBDatabaseAdmin.async_create_namespace | Create a namespace in this database as requested,
optionally waiting for it to be ready.
Async version of the method, for use in an asyncio context.
*DEPRECATED* (removal in 2.0). Switch to the "async_create_keyspace" method.** | {
"kind": "function",
"name": "async_create_namespace",
"path": "astrapy.admin.AstraDBDatabaseAdmin.async_create_namespace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the namespace name. If supplying a namespace that exists\nalready, the method call proceeds as usual... |
astrapy.admin.AstraDBDatabaseAdmin.async_create_keyspace | Create a keyspace in this database as requested,
optionally waiting for it to be ready.
Async version of the method, for use in an asyncio context. | {
"kind": "function",
"name": "async_create_keyspace",
"path": "astrapy.admin.AstraDBDatabaseAdmin.async_create_keyspace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the keyspace name. If supplying a keyspace that exists\nalready, the method call proceeds as usual, no... |
astrapy.admin.AstraDBDatabaseAdmin.drop_namespace | Delete a namespace from the database, optionally waiting for the database
to become active again.
*DEPRECATED* (removal in 2.0). Switch to the "drop_keyspace" method.** | {
"kind": "function",
"name": "drop_namespace",
"path": "astrapy.admin.AstraDBDatabaseAdmin.drop_namespace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the namespace to delete. If it does not exist in this database,\nan error is raised.",
"default": null,
... |
astrapy.admin.AstraDBDatabaseAdmin.drop_keyspace | Delete a keyspace from the database, optionally waiting for the database
to become active again. | {
"kind": "function",
"name": "drop_keyspace",
"path": "astrapy.admin.AstraDBDatabaseAdmin.drop_keyspace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the keyspace to delete. If it does not exist in this database,\nan error is raised.",
"default": null,
"va... |
astrapy.admin.AstraDBDatabaseAdmin.async_drop_namespace | Delete a namespace from the database, optionally waiting for the database
to become active again.
Async version of the method, for use in an asyncio context.
*DEPRECATED* (removal in 2.0). Switch to the "async_drop_namespace" method.** | {
"kind": "function",
"name": "async_drop_namespace",
"path": "astrapy.admin.AstraDBDatabaseAdmin.async_drop_namespace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the namespace to delete. If it does not exist in this database,\nan error is raised.",
"default": ... |
astrapy.admin.AstraDBDatabaseAdmin.async_drop_keyspace | Delete a keyspace from the database, optionally waiting for the database
to become active again.
Async version of the method, for use in an asyncio context. | {
"kind": "function",
"name": "async_drop_keyspace",
"path": "astrapy.admin.AstraDBDatabaseAdmin.async_drop_keyspace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the keyspace to delete. If it does not exist in this database,\nan error is raised.",
"default": nul... |
astrapy.admin.AstraDBDatabaseAdmin.drop | Drop this database, i.e. delete it completely and permanently with all its data.
This method wraps the `drop_database` method of the AstraDBAdmin class,
where more information may be found. | {
"kind": "function",
"name": "drop",
"path": "astrapy.admin.AstraDBDatabaseAdmin.drop",
"parameters": [
{
"name": "wait_until_active",
"type": "bool",
"description": "if True (default), the method returns only after\nthe database has actually been deleted (generally a few minutes).\nIf Fa... |
astrapy.admin.AstraDBDatabaseAdmin.async_drop | Drop this database, i.e. delete it completely and permanently with all its data.
Async version of the method, for use in an asyncio context.
This method wraps the `drop_database` method of the AstraDBAdmin class,
where more information may be found. | {
"kind": "function",
"name": "async_drop",
"path": "astrapy.admin.AstraDBDatabaseAdmin.async_drop",
"parameters": [
{
"name": "wait_until_active",
"type": "bool",
"description": "if True (default), the method returns only after\nthe database has actually been deleted (generally a few minu... |
astrapy.admin.AstraDBDatabaseAdmin.get_database | Create a Database instance from this database admin, for data-related tasks. | {
"kind": "function",
"name": "get_database",
"path": "astrapy.admin.AstraDBDatabaseAdmin.get_database",
"parameters": [
{
"name": "token",
"type": "str | TokenProvider | None",
"description": "if supplied, is passed to the Database instead of\nthe one set for this object. Useful if one wa... |
astrapy.admin.AstraDBDatabaseAdmin.get_async_database | Create an AsyncDatabase instance out of this class for working
with the data in it.
This method has identical behavior and signature as the sync
counterpart `get_database`: please see that one for more details. | {
"kind": "function",
"name": "get_async_database",
"path": "astrapy.admin.AstraDBDatabaseAdmin.get_async_database",
"parameters": [
{
"name": "token",
"type": "str | TokenProvider | None",
"description": null,
"default": "None",
"value": null
},
{
"name": "keyspa... |
astrapy.admin.AstraDBDatabaseAdmin.find_embedding_providers | Example (output abridged and indented for clarity):
>>> admin_for_my_db.find_embedding_providers()
FindEmbeddingProvidersResult(embedding_providers=..., openai, ...)
>>> admin_for_my_db.find_embedding_providers().embedding_providers
{
'openai': EmbeddingProvider(
display_name='OpenAI... | {
"kind": "function",
"name": "find_embedding_providers",
"path": "astrapy.admin.AstraDBDatabaseAdmin.find_embedding_providers",
"parameters": [
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the DevOps API request.",
"default": "None",... |
astrapy.admin.AstraDBDatabaseAdmin.async_find_embedding_providers | Example (output abridged and indented for clarity):
>>> admin_for_my_db.find_embedding_providers()
FindEmbeddingProvidersResult(embedding_providers=..., openai, ...)
>>> admin_for_my_db.find_embedding_providers().embedding_providers
{
'openai': EmbeddingProvider(
display_name='OpenAI... | {
"kind": "function",
"name": "async_find_embedding_providers",
"path": "astrapy.admin.AstraDBDatabaseAdmin.async_find_embedding_providers",
"parameters": [
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the DevOps API request.",
"defau... |
astrapy.admin.DataAPIDatabaseAdmin | An "admin" object for non-Astra Data API environments, to perform administrative
tasks at the keyspaces level such as creating/listing/dropping keyspaces.
Conforming to the architecture of non-Astra deployments of the Data API,
this object works within the one existing database. It is within that database
that the key... | {
"kind": "class",
"name": "DataAPIDatabaseAdmin",
"path": "astrapy.admin.DataAPIDatabaseAdmin",
"parameters": [
{
"name": "api_endpoint",
"type": "str",
"description": "the full URI to access the Data API,\ne.g. \"http://localhost:8181\".",
"default": null,
"value": null
}... |
astrapy.admin.DataAPIDatabaseAdmin.environment | {
"kind": "attribute",
"name": "environment",
"path": "astrapy.admin.DataAPIDatabaseAdmin.environment",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.constants.Environment",
"OTHER"
],
"value": "environment = environment or Environment.OTHER.lower()",
"yields": null,
"imp... | |
astrapy.admin.DataAPIDatabaseAdmin.token_provider | {
"kind": "attribute",
"name": "token_provider",
"path": "astrapy.admin.DataAPIDatabaseAdmin.token_provider",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "token_provider = coerce_token_provider(token)",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
... | |
astrapy.admin.DataAPIDatabaseAdmin.api_endpoint | {
"kind": "attribute",
"name": "api_endpoint",
"path": "astrapy.admin.DataAPIDatabaseAdmin.api_endpoint",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "api_endpoint = api_endpoint",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"e... | |
astrapy.admin.DataAPIDatabaseAdmin.callers | {
"kind": "attribute",
"name": "callers",
"path": "astrapy.admin.DataAPIDatabaseAdmin.callers",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "callers = callers_param",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,... | |
astrapy.admin.DataAPIDatabaseAdmin.api_path | {
"kind": "attribute",
"name": "api_path",
"path": "astrapy.admin.DataAPIDatabaseAdmin.api_path",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "api_path = api_path if api_path is not None else ''",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"expo... | |
astrapy.admin.DataAPIDatabaseAdmin.api_version | {
"kind": "attribute",
"name": "api_version",
"path": "astrapy.admin.DataAPIDatabaseAdmin.api_version",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "api_version = api_version if api_version is not None else ''",
"yields": null,
"imports": null,
"properties": null,
"bases"... | |
astrapy.admin.DataAPIDatabaseAdmin.spawner_database | {
"kind": "attribute",
"name": "spawner_database",
"path": "astrapy.admin.DataAPIDatabaseAdmin.spawner_database",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "spawner_database = spawner_database",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"expo... | |
astrapy.admin.DataAPIDatabaseAdmin.with_options | Create a clone of this DataAPIDatabaseAdmin with some changed attributes. | {
"kind": "function",
"name": "with_options",
"path": "astrapy.admin.DataAPIDatabaseAdmin.with_options",
"parameters": [
{
"name": "api_endpoint",
"type": "str | None",
"description": "the full URI to access the Data API,\ne.g. \"http://localhost:8181\".",
"default": "None",
"v... |
astrapy.admin.DataAPIDatabaseAdmin.set_caller | Set a new identity for the application/framework on behalf of which
the DevOps API calls will be performed (the "caller").
New objects spawned from this client afterwards will inherit the new settings. | {
"kind": "function",
"name": "set_caller",
"path": "astrapy.admin.DataAPIDatabaseAdmin.set_caller",
"parameters": [
{
"name": "caller_name",
"type": "str | None",
"description": "name of the application, or framework, on behalf of which\nthe DevOps API calls are performed. This ends up in... |
astrapy.admin.DataAPIDatabaseAdmin.list_namespaces | Query the API for a list of the namespaces in the database.
*DEPRECATED* (removal in 2.0). Switch to the "list_keyspaces" method.** | {
"kind": "function",
"name": "list_namespaces",
"path": "astrapy.admin.DataAPIDatabaseAdmin.list_namespaces",
"parameters": [
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the DevOps API request.",
"default": "None",
"value": "N... |
astrapy.admin.DataAPIDatabaseAdmin.list_keyspaces | Query the API for a list of the keyspaces in the database. | {
"kind": "function",
"name": "list_keyspaces",
"path": "astrapy.admin.DataAPIDatabaseAdmin.list_keyspaces",
"parameters": [
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the DevOps API request.",
"default": "None",
"value": "Non... |
astrapy.admin.DataAPIDatabaseAdmin.create_namespace | Create a namespace in the database, returning {'ok': 1} if successful.
*DEPRECATED* (removal in 2.0). Switch to the "create_keyspace" method.** | {
"kind": "function",
"name": "create_namespace",
"path": "astrapy.admin.DataAPIDatabaseAdmin.create_namespace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the namespace name. If supplying a namespace that exists\nalready, the method call proceeds as usual, no errors ... |
astrapy.admin.DataAPIDatabaseAdmin.create_keyspace | Create a keyspace in the database, returning {'ok': 1} if successful. | {
"kind": "function",
"name": "create_keyspace",
"path": "astrapy.admin.DataAPIDatabaseAdmin.create_keyspace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the keyspace name. If supplying a keyspace that exists\nalready, the method call proceeds as usual, no errors are\... |
astrapy.admin.DataAPIDatabaseAdmin.drop_namespace | Drop (delete) a namespace from the database.
*DEPRECATED* (removal in 2.0). Switch to the "drop_namespace" method.** | {
"kind": "function",
"name": "drop_namespace",
"path": "astrapy.admin.DataAPIDatabaseAdmin.drop_namespace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the namespace to delete. If it does not exist in this database,\nan error is raised.",
"default": null,
... |
astrapy.admin.DataAPIDatabaseAdmin.drop_keyspace | Drop (delete) a keyspace from the database. | {
"kind": "function",
"name": "drop_keyspace",
"path": "astrapy.admin.DataAPIDatabaseAdmin.drop_keyspace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the keyspace to delete. If it does not exist in this database,\nan error is raised.",
"default": null,
"va... |
astrapy.admin.DataAPIDatabaseAdmin.async_list_namespaces | Query the API for a list of the namespaces in the database.
Async version of the method, for use in an asyncio context.
*DEPRECATED* (removal in 2.0). Switch to the "async_list_keyspaces" method.** | {
"kind": "function",
"name": "async_list_namespaces",
"path": "astrapy.admin.DataAPIDatabaseAdmin.async_list_namespaces",
"parameters": [
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the DevOps API request.",
"default": "None",
... |
astrapy.admin.DataAPIDatabaseAdmin.async_list_keyspaces | Query the API for a list of the keyspaces in the database.
Async version of the method, for use in an asyncio context. | {
"kind": "function",
"name": "async_list_keyspaces",
"path": "astrapy.admin.DataAPIDatabaseAdmin.async_list_keyspaces",
"parameters": [
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the DevOps API request.",
"default": "None",
"... |
astrapy.admin.DataAPIDatabaseAdmin.async_create_namespace | Create a namespace in the database, returning {'ok': 1} if successful.
Async version of the method, for use in an asyncio context.
*DEPRECATED* (removal in 2.0). Switch to the "async_create_keyspace" method.** | {
"kind": "function",
"name": "async_create_namespace",
"path": "astrapy.admin.DataAPIDatabaseAdmin.async_create_namespace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the namespace name. If supplying a namespace that exists\nalready, the method call proceeds as usual... |
astrapy.admin.DataAPIDatabaseAdmin.async_create_keyspace | Create a keyspace in the database, returning {'ok': 1} if successful.
Async version of the method, for use in an asyncio context. | {
"kind": "function",
"name": "async_create_keyspace",
"path": "astrapy.admin.DataAPIDatabaseAdmin.async_create_keyspace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the keyspace name. If supplying a keyspace that exists\nalready, the method call proceeds as usual, no... |
astrapy.admin.DataAPIDatabaseAdmin.async_drop_namespace | Drop (delete) a namespace from the database.
Async version of the method, for use in an asyncio context.
*DEPRECATED* (removal in 2.0). Switch to the "async_drop_keyspace" method.** | {
"kind": "function",
"name": "async_drop_namespace",
"path": "astrapy.admin.DataAPIDatabaseAdmin.async_drop_namespace",
"parameters": [
{
"name": "name",
"type": "str",
"description": "the namespace to delete. If it does not exist in this database,\nan error is raised.",
"default": ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.