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"
.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
File details
Details for the file cognite_power_ops-0.101.1.tar.gz
.
File metadata
- Download URL: cognite_power_ops-0.101.1.tar.gz
- Upload date:
- Size: 651.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 489bde5d7525007150e23e332391cf5702acbb70e901234819a3540d1ad40dda |
|
MD5 | ba067c69adfcbaa1adb55418f0b86880 |
|
BLAKE2b-256 | b24e72dbfcf8d4aa12b127da15652920f595b6d4227fc498f3e45374a6d6bac7 |
File details
Details for the file cognite_power_ops-0.101.1-py3-none-any.whl
.
File metadata
- Download URL: cognite_power_ops-0.101.1-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2635bd1422f3c4b3f21dbd8d28040d0a9ce64062fa66ac00d853ffe08676338 |
|
MD5 | 4cb7b6b7c015987744645b067f3cd84a |
|
BLAKE2b-256 | 65a3c0e4a7dd19ad928118382db70393400513aca8d281d24a5b9c733b106833 |