Python SDK for Joblet - A distributed task execution system
Project description
Joblet Python SDK
The official Python SDK for Joblet - a distributed job orchestration system with GPU support.
Installation
pip install joblet-sdk
Quick Start
from joblet import JobletClient
# Connect to your Joblet server
with JobletClient(
host="your-joblet-server.com",
port=50051,
ca_cert_path="ca.pem",
client_cert_path="client.pem",
client_key_path="client.key"
) as client:
# Run a simple job
job = client.jobs.run_job(
command="echo",
args=["Hello, Joblet!"],
name="my-first-job"
)
print(f"Job started: {job['job_uuid']}")
Configuration
Create ~/.rnx/rnx-config.yml:
version: "3.0"
nodes:
default:
address: "your-joblet-server:50051"
cert: |
-----BEGIN CERTIFICATE-----
# Your client certificate
-----END CERTIFICATE-----
key: |
-----BEGIN PRIVATE KEY-----
# Your client private key
-----END PRIVATE KEY-----
ca: |
-----BEGIN CERTIFICATE-----
# Your CA certificate
-----END CERTIFICATE-----
GPU Support
# Run GPU-accelerated job
job = client.jobs.run_job(
command="nvidia-smi",
name="gpu-job",
gpu_count=1,
gpu_memory_mb=4096,
runtime="python-3.11-ml"
)
Features
- Job Management - Run single jobs or complex workflows
- GPU Support - Native GPU acceleration for ML/AI workloads
- Resource Management - CPU, memory, and GPU limits
- Workflows - Chain jobs with dependencies
- Monitoring - Real-time job status and logs
- Security - mTLS encryption and authentication
API Reference
Jobs
client.jobs.run_job()- Execute a jobclient.jobs.cancel_job()- Cancel a scheduled jobclient.jobs.stop_job()- Stop a running jobclient.jobs.get_job_status()- Get job statusclient.jobs.get_job_logs()- Retrieve job logsclient.jobs.run_workflow()- Execute a workflow
Resources
client.networks- Network managementclient.volumes- Storage managementclient.monitoring- System monitoringclient.runtimes- Runtime environments
Development
# Clone and setup
git clone https://github.com/ehsaniara/joblet-sdk-python.git
cd joblet-sdk-python
pip install -e .[dev]
# Run tests
pytest tests/
# Format code
black joblet/ examples/
Examples
See the examples/ directory for more detailed usage examples:
basic_job.py- Simple job executiongpu_example.py- GPU-accelerated workloadsworkflow_example.py- Complex workflows
License
MIT License - see LICENSE file for details.
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 joblet_sdk_python-0.1.0.tar.gz.
File metadata
- Download URL: joblet_sdk_python-0.1.0.tar.gz
- Upload date:
- Size: 56.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94545e531f01810f926d0cd4b7894765246f33b95bcb2722aa49ae528851f82e
|
|
| MD5 |
63bbea5e4c8dcb6dabe827aaa74db5d4
|
|
| BLAKE2b-256 |
420f0d1d7e27864f55965c864eda4a944f189fab94ae1099d652fd2e974ea855
|
Provenance
The following attestation bundles were made for joblet_sdk_python-0.1.0.tar.gz:
Publisher:
release.yml on ehsaniara/joblet-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
joblet_sdk_python-0.1.0.tar.gz -
Subject digest:
94545e531f01810f926d0cd4b7894765246f33b95bcb2722aa49ae528851f82e - Sigstore transparency entry: 569406389
- Sigstore integration time:
-
Permalink:
ehsaniara/joblet-sdk-python@8210bd995bd60fab85a172fbccd15281c9c4071e -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/ehsaniara
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8210bd995bd60fab85a172fbccd15281c9c4071e -
Trigger Event:
push
-
Statement type:
File details
Details for the file joblet_sdk_python-0.1.0-py3-none-any.whl.
File metadata
- Download URL: joblet_sdk_python-0.1.0-py3-none-any.whl
- Upload date:
- Size: 43.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f142f46b10bfa404d8e98b18be6c2cf50edf5c740aa27f590ebea199bde303db
|
|
| MD5 |
bc48ad334baf5ddb75d97f7bec10ade1
|
|
| BLAKE2b-256 |
6efa6839f90d0bd0ae300cef84b5b55b8a29c7caa5e93a34227a5ea726d83823
|
Provenance
The following attestation bundles were made for joblet_sdk_python-0.1.0-py3-none-any.whl:
Publisher:
release.yml on ehsaniara/joblet-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
joblet_sdk_python-0.1.0-py3-none-any.whl -
Subject digest:
f142f46b10bfa404d8e98b18be6c2cf50edf5c740aa27f590ebea199bde303db - Sigstore transparency entry: 569406399
- Sigstore integration time:
-
Permalink:
ehsaniara/joblet-sdk-python@8210bd995bd60fab85a172fbccd15281c9c4071e -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/ehsaniara
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8210bd995bd60fab85a172fbccd15281c9c4071e -
Trigger Event:
push
-
Statement type: