Skip to main content

haps-client

Python client for the HAPS platform: publish an application, submit jobs to it, and read the results, without an HPC account of your own.

For users and developers. To run jobs as a maintainer, see haps-runtime.

Install

pip install haps-client

Requires Python 3.11 or newer.

Quick start

from haps_client import HapsClient, MessageException

client = HapsClient(
    ebservice_url="https://ebservice.example.org/api/v1",
    ebuffer_url="https://ebuffer.example.org/api/v1",
    username="me",
    password="secret",
)

app = client.mservices.find(name="echo")[0]

data = client.buffers.create(reserved_size=1024, lifespan=3600)
data.fill(b"hello")
out = client.buffers.create(reserved_size=1024, lifespan=3600)

job = app.submit_job({"arguments": [], "ebin": [data.uuid], "ebout": [out.uuid]})
print(job.get_run_status())

client.close()

Errors

Every API error is an ebcommon MessageException:

try:
    client.buffers.get(uid)
except MessageException as e:
    print(e.status_code, e.url, e.message.name)

status_code is None when the server could not be reached.

License

MIT

Metadata

Release files for haps-client 0.4.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 haps-client 0.4.1
File Size Uploaded Provenance Actions
haps_client-0.4.1.tar.gz 24.0 kB Without provenance Details for haps_client-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for haps-client 0.4.1
File Interpreter ABI Platform Actions
haps_client-0.4.1-py3-none-any.whl Python 3 none any Details for haps_client-0.4.1-py3-none-any.whl

Total release size: 53.9 kB

Release files / haps_client-0.4.1.tar.gz

Download URL haps_client-0.4.1.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b39b4c3a15e977a36703e43a491597fa310862a569ebebed4c10bf258b879759
BLAKE2b-256 checksum
How to use checksums
75a401fd1ee6835e785dc77041c0f71584dc5efa4674482695d55a07c830201a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / haps_client-0.4.1-py3-none-any.whl

Download URL haps_client-0.4.1-py3-none-any.whl
Size 29.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
464ac708bfc26738958afd8b13d969e47d4077fde8f280633ce748c62f0cce92
BLAKE2b-256 checksum
How to use checksums
7bfbfc4db2d69a1d36a487d3a70974789752ef6b94183bfd0c23023061da18fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for haps-client 0.4.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