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 stringpassword- 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 usernamePSR_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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file psr_cloud-0.3.21.tar.gz.
File metadata
- Download URL: psr_cloud-0.3.21.tar.gz
- Upload date:
- Size: 37.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d3ea533fe89c73468edb47b927b35a0e95d2cc7d85d8ae6a553a9c6d65f222c
|
|
| MD5 |
eaeaf50c85b30a7c25f0861a2fef797c
|
|
| BLAKE2b-256 |
6771183665334750eb10e31eb178d273ff2b42f382f3c22d9891d7286e87f311
|
File details
Details for the file psr_cloud-0.3.21-py3-none-any.whl.
File metadata
- Download URL: psr_cloud-0.3.21-py3-none-any.whl
- Upload date:
- Size: 33.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8aad5deefa468801880c10f8e6f693ea249b697727f84c00d62675d448eab475
|
|
| MD5 |
bc569e935373c7b0d0fd1c261ddd1825
|
|
| BLAKE2b-256 |
74a2d5def0da9a622b265cf3d98755c8fad7452640b094359cbb82d18445041a
|