Skip to main content

Py4HEAppE (Python for HEAppE Middleware)

Py4HEAppE simplifies access to the HEAppE features by providing a high-level Python interface that abstracts away the complexities of direct API interactions. This allows users to focus on their core tasks without worrying about the underlying details of API communication. It can be usable in two modes depends what the end-user needs:

  • HEAppE CLI Commands
  • HEAppE API Wrapper Library

Key Benefits

Ease of Use:

Py4HEAppE provides a straightforward and intuitive interface for interacting with the HEAppE API. Users can perform complex operations with simple function calls.

Abstraction:

The library abstracts the intricacies of the HEAppE API, allowing users to work with high-level concepts and operations.

Efficiency:

By using Py4HEAppE, users can quickly integrate HEAppE functionalities into their Python applications, reducing development time and effort.

Consistency:

The library ensures consistent and reliable communication with the HEAppE API, handling errors and edge cases gracefully.

Supported HEAppE versions

Py4HEAppE HEAppE Version Notes
2.5.X 6.2.X 6.1.X, 6.0.X, 5.X.X, 4.X.X W/O Admin/File sections in CLI
2.4.X 6.1.X, 6.0.X, 5.X.X, 4.X.X W/O Admin/File sections in CLI
2.3.X 6.0.x, 5.0.X, 4.X.X W/O Admin/File sections in CLI
2.2.X 5.0.X, 4.3.X, 4.2.X W/O Admin/File sections in CLI
2.1.X 5.0.X, 4.3.X, 4.2.X W/O Admin/Job/File sections in CLI
2.0.X 5.0.X W/O Admin/Job/File sections in CLI
1.X.X 4.3.X, 4.2.X W/O Admin/Job/File sections in CLI

Getting Started

Prerequisites

  • Python (version 3.11)
  • Pip (package installer)
  • Access to Deployed HEAppE instance (HEAppE instance URL and HPC project identificator)

Installation

pip install Py4HEAppE

Note: In some cases, you can obtain a warning message like this "WARNING: The script py4heappe.exe is installed in 'C:\Users\user\AppData\Roaming\Python\Python311\Scripts' which is not on PATH." If you obtained a similar warning message, it is necessary to add the mentioned path into your operation system PATH variable or use a path with an executable file (i.e. C:\Users\user\AppData\Roaming\Python\Python311\Scripts\py4heappe.exe).

HEAppE CLI

The HEAppE CLI (Command Line Interface) provides a convenient way to interact with the HEAppE Middleware directly from your terminal. It allows users to perform various operations such as authentication, job management, and information retrieval without needing to write any code. This makes it an ideal tool for end-users who need to manage HEAppE Instance efficiently.

Usage

For using HEAppE CLI it is neeaded to initializing Py4HEAppE for usage with a specific HEAppE Instance (It is necessary to call for the first usage). Command requires HPC project accounting string and HEAppE Instance URL.

# Initial Setup
py4heappe Conf Init

All mentioned functions are aggregated to CLI's specific commands groups (commands aggregations). To do so, type the following to provide help on how to use managers via CLI.

# List of commands groups (commands aggregations)
py4heappe --help

Available Commands Groups (commands aggregations):

# Authentication commands group
py4heappe Auth --help

# Command Template Management commands group
py4heappe CmdTemp --help

# Information commands group
py4heappe Info --help

# Job Management commands group
py4heappe Job --help

# Report commands group
py4heappe Report --help

Note: On Windows operation system need to use "py4heappe.exe" instead of "py4heappe".

(back to top)

HEAppE API Wrapper Library

In this mode, the Py4HEAppE package is used as a wrapper for HEAppE API specification. It allows users to perform various operations from HEAppE API, such as authentication, job management, and information retrieval, without needing to write their API wrapper code. It can be easily integrated with internal Python projects that HEAppE Middleware wants to be used. More information about usability can be found in the section below.

Usage

It is required to specify following modules in "requirements.txt" file.

paramiko>=4.0.0
scp==0.15.0
urllib3>=2.0.2

The code snapshot illustrated an example of "how to" obtain cluster information from the HEAppE Instance. For more detailed examples of basic HPC workflow, please refer to the example.py file.

import json
import os
import time
from io import StringIO
from pathlib import Path

import py4heappe.core as hp

print("\nFetching cluster info...")
lac_body = {
    "_preload_content": False
}

ciEndpoint = hp.ClusterInformationApi(api_instance)
r = ciEndpoint.heappe_cluster_information_list_available_clusters_get(**lac_body)
r_data = json.loads(r.data)
print(json.dumps(r_data, indent = 3))

(back to top)

Acknowledgement

e-Infra CZ This work was supported by the Ministry of Education, Youth and Sports of the Czech Republic through the e-INFRA CZ (ID:90254)

(back to top)

Metadata

Release files for Py4HEAppE 2.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Py4HEAppE 2.5.1
File Size Uploaded Provenance Actions
py4heappe-2.5.1.tar.gz 564.7 kB Without provenance Details for py4heappe-2.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Py4HEAppE 2.5.1
File Interpreter ABI Platform Actions
py4heappe-2.5.1-py3-none-any.whl Python 3 none any Details for py4heappe-2.5.1-py3-none-any.whl

Total release size: 1.6 MB

Release files / py4heappe-2.5.1.tar.gz

Download URL py4heappe-2.5.1.tar.gz
Size 564.7 kB
Tags Source
SHA-256 checksum
How to use checksums
91e7c32c9b2356a6d35cf974189cc63e84b1bb3c5a76678615fac1005ffe15d6
BLAKE2b-256 checksum
How to use checksums
a5a244b901d0db8b504660f2b887d36fd3c0176f66a25b0d8bd47a9d4bb03faa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / py4heappe-2.5.1-py3-none-any.whl

Download URL py4heappe-2.5.1-py3-none-any.whl
Size 994.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8c1dc82d83301f2d32468a89a600e12ad5e323f8bf1dbaaa79fa67953e12853
BLAKE2b-256 checksum
How to use checksums
e69f088a797e6f30941d095c7bbe1de6f63756d1d538527c220c7d65a90404da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for Py4HEAppE 2.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page