Installation
Prerequisites
- Python 3.10+ (3.11 or 3.12 recommended for local development)
- Access to a Cognite Data Fusion (CDF) project with credentials for the APIs you plan to use (Data Modeling, Records, and optionally Functions/Workflows for deployment)
- A service principal or user account with
client_idandclient_secret(or another auth method supported by the Cognite SDK)
For your first local validation run, you only need the package and CDF read access to instances you validate. Deployment to Cognite Functions requires additional ACLs — see Deploy infrastructure and pipeline and Lifecycle and CI/CD.
Install the package
From PyPI:
In a notebook:
After install, restart the kernel or interpreter so imports pick up the package. The package inlines SHACL validation code — no separate handler checkout is required.
Cognite Functions (deployed in CDF)
When validation runs inside a Cognite Function, dependencies are declared in the function’s requirements.txt (folder deploy) or via [requirements] tags in the handler (function_handle deploy). deploy_validation_infrastructure() builds the function bundle from the embedded handler code in the package.
If you deploy a custom function that uses this package, list it in requirements:
See Deploy infrastructure and lifecycle for deployment examples and Runtime options for usage contexts.
Next step
Continue with Get started with data quality validation to load credentials and run run_validation() locally.