List databases
- async AsyncCogniteClient.raw.databases.list(
- limit: int | None = 25,
-
- Parameters:
limit (int | None) – Maximum number of databases to return. Defaults to 25. Set to -1, float(“inf”) or None to return all items.
- Returns:
List of requested databases.
- Return type:
Examples
List the first 5 databases:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> db_list = client.raw.databases.list(limit=5)
Iterate over databases, one-by-one:
>>> for db in client.raw.databases(): ... db # do something with the db
Iterate over chunks of databases to reduce memory load:
>>> for db_list in client.raw.databases(chunk_size=2500): ... db_list # do something with the dbs