Skip to main content

SDK for power markets operations on Cognite Data Fusion

Project description

Welcome to PowerOps SDK

release Documentation Status Github PyPI Downloads GitHub Code style: black Ruff mypy

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 tool powerops.

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:

  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

[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

cognite_power_ops-0.102.2.tar.gz (647.6 kB view details)

Uploaded Source

Built Distribution

cognite_power_ops-0.102.2-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file cognite_power_ops-0.102.2.tar.gz.

File metadata

  • Download URL: cognite_power_ops-0.102.2.tar.gz
  • Upload date:
  • Size: 647.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for cognite_power_ops-0.102.2.tar.gz
Algorithm Hash digest
SHA256 1e5c6c3a4042a78ab2f07b58e5a353739fa94a3343d6b74e85d0c71f443b87fd
MD5 e987c2c828d3ad574621a41395215de3
BLAKE2b-256 65a4306f842bbe8ec09d0f9f666458baec240b3f924671dd08559758c785b518

See more details on using hashes here.

File details

Details for the file cognite_power_ops-0.102.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cognite_power_ops-0.102.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c57790882c6c71e49b00d4d0d88f3843ca33c96557771e19bdb7e3eb9a3ba20c
MD5 b386a42f8a6661974c22e55ae337c7e0
BLAKE2b-256 18713e19cd0f780e0c7ab4400b0053881e330b0bdf619aaa7bb333bd454979bc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page