Skip to main content

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 job
  • client.jobs.cancel_job() - Cancel a scheduled job
  • client.jobs.stop_job() - Stop a running job
  • client.jobs.get_job_status() - Get job status
  • client.jobs.get_job_logs() - Retrieve job logs
  • client.jobs.run_workflow() - Execute a workflow

Resources

  • client.networks - Network management
  • client.volumes - Storage management
  • client.monitoring - System monitoring
  • client.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 execution
  • gpu_example.py - GPU-accelerated workloads
  • workflow_example.py - Complex workflows

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

joblet_sdk_python-0.1.0.tar.gz (56.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

joblet_sdk_python-0.1.0-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

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

Hashes for joblet_sdk_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 94545e531f01810f926d0cd4b7894765246f33b95bcb2722aa49ae528851f82e
MD5 63bbea5e4c8dcb6dabe827aaa74db5d4
BLAKE2b-256 420f0d1d7e27864f55965c864eda4a944f189fab94ae1099d652fd2e974ea855

See more details on using hashes here.

Provenance

The following attestation bundles were made for joblet_sdk_python-0.1.0.tar.gz:

Publisher: release.yml on ehsaniara/joblet-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file joblet_sdk_python-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for joblet_sdk_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f142f46b10bfa404d8e98b18be6c2cf50edf5c740aa27f590ebea199bde303db
MD5 bc48ad334baf5ddb75d97f7bec10ade1
BLAKE2b-256 6efa6839f90d0bd0ae300cef84b5b55b8a29c7caa5e93a34227a5ea726d83823

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page