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.100.0.tar.gz
.
File metadata
- Download URL: cognite_power_ops-0.100.0.tar.gz
- Upload date:
- Size: 721.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cb379e9073adb31276f1d1e817d97c6d216238a22817375c45fa105deec69d2 |
|
MD5 | 769fc2bef1362e849d409aaaa6f96dfb |
|
BLAKE2b-256 | 86a0ab8b2a4c680b245e6f826a50fb8b8613636c871d6be007af07ac99b058cb |
File details
Details for the file cognite_power_ops-0.100.0-py3-none-any.whl
.
File metadata
- Download URL: cognite_power_ops-0.100.0-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39a578dd01aff8dcdcf39499c1c305718ecffc4c4044ebc3414e28b08bdc54d8 |
|
MD5 | bb6dc39d5b2f6d6ae8d55410fc967179 |
|
BLAKE2b-256 | c6b74c94c83e54083dea64779c7ebcd3bdc48e2a855bbf907e9c78bada808413 |