Cognite Python SDK Documentation
This is the Cognite Python SDK for developers and data scientists working with Cognite Data Fusion (CDF). The package is tightly integrated with pandas, and helps you work easily and efficiently with data in Cognite Data Fusion (CDF).
Installation
To install or upgrade this package:
pip:
pip install --upgrade cognite-sdk
poetry:
poetry add cognite-sdk
uv:
uv add cognite-sdk
To install with optional dependencies:
pip install "cognite-sdk[pandas, geo]"
Available extras:
numpy: numpy
pandas: pandas
geo: geopandas, shapely
sympy: sympy
all: all of the above
What’s new in v8
The SDK v8 introduces full async support with the new AsyncCogniteClient. This enables:
Native
async/awaitpatterns for all API operationsNon-blocking concurrent operations directly in Notebooks (including browser-based via Pyodide) and UI frameworks like Streamlit
Significantly faster file uploads on Windows (new underlying HTTP client,
httpx)Async variants for all helper/utility methods on data classes (e.g.,
Functionnow hascall_async)
Other improvements:
Simpler client instantiation: pass either
clusterorbase_urlTyped instance apply classes (e.g.,
CogniteAssetApply) now work correctly with patch updates (replace=False)Better pandas DataFrame columns for datapoints: now uses
MultiIndexfor identifiers, aggregates, units, etc.Read data classes now have correct types (no longer
Optionalon required fields)More specific exceptions are now always raised when appropriate (
CogniteNotFoundError,CogniteDuplicatedError)
For a complete list of changes, see the Migration Guide.
The synchronous CogniteClient remains fully supported and now wraps the async client internally.
# Async client (new in v8!)
from cognite.client import AsyncCogniteClient
async def main():
client = AsyncCogniteClient()
tss = await client.time_series.list()
# Sync client (still supported)
from cognite.client import CogniteClient
client = CogniteClient()
tss = client.time_series.list()
See the Quickstart for configuration examples.