Welcome to PowerOps SDK
What is it?
The PowerOps SDK is a domain-specific SDK for interacting with Cognite Data Fusion (CDF) for the power operations' domain.
Main Features
cognite.powerops.client.PowerOpsClientused to interact with CDF in a domain-specific language.- Resource Sync,
resync, used to sync configuration files with CDF through the CLI toolpowerops.
Installation
Configuration
Configuration of the PowerOpsClient and resync is done through settings files.
Settings Files
The settings file are in .toml format. By default, the SDK will look for two settings files:
1. settings.toml in the current directory.
2. .secrets.toml in the current directory.
The motivation for splitting them is to avoid checking in secrets into Git.
Example of settings files:
settings.toml:
[cognite]
login_flow = "interactive"
project = "<cdf-project>"
tenant_id = "<tenant-id>"
cdf_cluster = "<cdf-cluster>"
client_id = "<client-id>"
[powerops]
read_dataset = "uc:000:powerops"
write_dataset = "uc:000:powerops"
monitor_dataset = "uc:po:monitoring"
.secrets.toml
Note: You can configure which settings files to use by setting the environment variable SETTINGS__FILES to a semicolon-separated list of file names.
Usage
Run Resync
See available commands:
Example of showing planned changes:
PowerOpsClient
For more examples, see the examples section of the documentation.