SDK library to communicate with ComputeHorde Facilitator
Project description
compute-horde-facilitator-sdk
Installation
pip install compute-horde-facilitator-sdk
Usage
Register at https://facilitator.computehorde.io and generate an API Token.
Example:
import time
from compute_horde_facilitator_sdk.v1 import FacilitatorClient
computehorde = FacilitatorClient(
token=...,
)
job = computehorde.create_docker_job(
docker_image='backenddevelopersltd/gen_caption_v2',
input_url='https://raw.githubusercontent.com/backend-developers-ltd/'
'ComputeHorde-examples/master/input_shapes.zip'
# The zip file will be extracted within the Docker container to the /volume directory
)
while True:
job = computehorde.get_job(job['uuid'])
if job['status'] in ['Completed', 'Failed']:
break
time.sleep(10)
print(f'Job finished with status: {job["status"]}. Stdout is: "{job["stdout"]}",'
f' output_url is {job["output_download_url"]}')
# During job execution, any files generated in the /output directory will be incorporated into the final job result,
# which can be downloaded from the url printed above. Full STDOUT and STDERR will also be there.
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
File details
Details for the file compute_horde_facilitator_sdk-0.0.3.tar.gz
.
File metadata
- Download URL: compute_horde_facilitator_sdk-0.0.3.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78fa1a47314ac1c261ae3108c5c20f4d575119ab8a058ff36749b2c5aebb08d6 |
|
MD5 | 960d5ec8040b33e07ce725f4a8630a0a |
|
BLAKE2b-256 | b00b1c5f403cabd76350c1003f5e46a1337a4f9d12af72a78ca4386549307845 |
File details
Details for the file compute_horde_facilitator_sdk-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: compute_horde_facilitator_sdk-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1262361036f6d6e939911d053beab42ef7e3c75259bca3763b83017dfc712c6 |
|
MD5 | cd47007925ca7fddd0871b9703f2b9de |
|
BLAKE2b-256 | d9dc429427306a23a30fba22a77e50d7553aeea5b07b9cd01785bdca7dbe0b53 |