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"
  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 planed 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.70.2.tar.gz (176.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cognite_power_ops-0.70.2-py3-none-any.whl (318.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cognite_power_ops-0.70.2.tar.gz
  • Upload date:
  • Size: 176.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for cognite_power_ops-0.70.2.tar.gz
Algorithm Hash digest
SHA256 bd1ad67facd43522f4ab783c3af6afdb796c9f323a38ee849fc5d22a83ed1013
MD5 7a53ebb0032773fcfd2f6d7364c86ef2
BLAKE2b-256 321a22c505aaa09ab531d962b17782df76e8e013a7e2b4abda8f54572feb266d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cognite_power_ops-0.70.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2fbda72c37380fd41a23a4e7348da1cc8d3b360344a8b0c83e7931de6b282d7e
MD5 1262831b8a20dab53f2eed8d39fd5b38
BLAKE2b-256 0a81498009903f6edb753137fe6069ca1315f8b108696b22c24243cd067816b8

See more details on using hashes here.

Supported by

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