Skip to main content

PSR Cloud Python Module

Project description

psr.cloud (pycloud) Module

Installation

From source (Recommended)

Copy psr folder and its contents to your work directory or add its parent path to PYTHONPATH environment variable before running it.

pip

If you have pip installed and the correct git credentials run the command:

pip install git+https://github.com/psrenergy/pycloud.git

Usage

import psr.cloud

client = psr.cloud.Client()

case = psr.cloud.Case(data_path=r"C:\PSR\Sddp17.3\Example\12_stages\Case21",
                      price_optimized=True,
                      program="SDDP",
                      program_version="17.3.7",
                      name="Test PyCloud",
                      execution_type="Default",
                      number_of_processes=64,
                      memory_per_process_ratio="2:1",
                      repository_duration=2 # Normal (1 month)
                      )

client.run_case(case)

Authentication

Keyword argument specified in Client constructor:

  • username - specify username string
  • password - plain password string
client = psr.cloud.Client(username="myuser", password=os.environ["MY_PASSWORD"])

The password will never be stored plainly, only its md5 hash will be used.

Read from environment variables

Prefered over keyword arguments:

  • PSR_CLOUD_USER - specify username
  • PSR_CLOUD_PASSWORD_HASH - md5 password hash

Password hash can be obtained by running the code below:

import psr.cloud as pycloud
pycloud.hash_password("ExamplePassword")

Automatic

Will use PSR Cloud client auth data, if avaiblable.

Querying PSR Cloud options

Available programs/models

get_programs() -> list[str]

Available model versions

get_program_versions(program: str) -> dict[int, str]

Available execution types

get_execution_types(program: str, version: Union[str, int]) -> dict[int, str]

Available memory per process ratios

get_memory_per_process_ratios() -> list[str]

Available repository durations

get_repository_durations() -> dict[int, str]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psr_cloud-0.3.25.tar.gz (40.2 kB view details)

Uploaded Source

Built Distribution

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

psr_cloud-0.3.25-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

Details for the file psr_cloud-0.3.25.tar.gz.

File metadata

  • Download URL: psr_cloud-0.3.25.tar.gz
  • Upload date:
  • Size: 40.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for psr_cloud-0.3.25.tar.gz
Algorithm Hash digest
SHA256 d80b8bbe63e936ba13dfa960096c38fb75423c1280f3175a465f92b0bdd3b5ac
MD5 da5925c3b641edc6a26c4bbb26192ec6
BLAKE2b-256 c9bce7f609c6e8dc3ce02f9a131f993a677ed8af70c8bf9ef8e66a935c20bc36

See more details on using hashes here.

File details

Details for the file psr_cloud-0.3.25-py3-none-any.whl.

File metadata

  • Download URL: psr_cloud-0.3.25-py3-none-any.whl
  • Upload date:
  • Size: 40.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for psr_cloud-0.3.25-py3-none-any.whl
Algorithm Hash digest
SHA256 b8e57d6d33bc277bbc46899266a6b1908ea3c90b23efd0b86c8fe5d6b79088ab
MD5 90b1d242b2c66e00b89e15db73d0c60c
BLAKE2b-256 c5bc9d7e23d996275aed2e09f00b17e4ad9fb4bc422ce2e4053e30e0c9c54722

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