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.102.1.tar.gz
.
File metadata
- Download URL: cognite_power_ops-0.102.1.tar.gz
- Upload date:
- Size: 648.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f350c06564f226fbe3254a43d3037cf79c607d4c65dc881e2825a6fa310b1408 |
|
MD5 | 1e04bae67cedf726fd89f47e04d5d23f |
|
BLAKE2b-256 | 3224d2a79f1b1acb10f3b724f7fd628b035b1040af0be9822e7cb439a7326b61 |
File details
Details for the file cognite_power_ops-0.102.1-py3-none-any.whl
.
File metadata
- Download URL: cognite_power_ops-0.102.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 | b989263605a4ac766c2616b87a579145a59bc4d8bf2c41b25c39b1262c0270fc |
|
MD5 | a56492489a6681b0c18b3b8a05f0b827 |
|
BLAKE2b-256 | d230cb51ea5337a68e78fe7f8220e6ff5c8a3300ada6fd2a2482324d4c325769 |