SDK for power markets operations on Cognite Data Fusion
Project description
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.PowerOpsClient
used to interact with CDF in a domain-specific language.- Resource Sync,
resync
, used to sync configuration files with CDF through the CLI toolpowerops
.
Installation
pip install cognite-power-ops
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:
settings.toml
in the current directory..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"
cogshop_version = ""
.secrets.toml
[cognite]
client_secret = "<client-secret>"
Note: You can configure which settings files to use by setting the environment variable SETTINGS__FILES
to a semicolon-separated list of file names.
import os
os.environ["SETTINGS_FILES"] = ".my_settings.toml;.secrets.my_secrets.toml"
Usage
Run Resync
See available commands:
$ powerops --help
Example of showing planned changes:
$ powerops plan tests/data/demo Dayahead
PowerOpsClient
from cognite.powerops.client import PowerOpsClient
client = PowerOpsClient.from_settings()
client.shop.runs.trigger()
For more examples, see the examples section of the documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cognite_power_ops-0.97.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ecbbfc3b6a21f0b841c07d3ad6e6e2d5d94e3ea015a9da0341768c1126c0527 |
|
MD5 | 58134ba7cc60f96eb6cdc41b57ab5b40 |
|
BLAKE2b-256 | 6c8ed792595f13891a11316e6159a24f0d162976bd8a76ac64a163760e24b68b |