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-python

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-1.1.4.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-1.1.4-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

Details for the file joblet_sdk_python-1.1.4.tar.gz.

File metadata

  • Download URL: joblet_sdk_python-1.1.4.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-1.1.4.tar.gz
Algorithm Hash digest
SHA256 4a80559ac008eb3106d8e939922f4e4dc11570ac7047fd717056e3873b886085
MD5 2103e2f068f0659c76a82e473c60f296
BLAKE2b-256 37e6205144c9e5b8100a70f5d692251eb8607f0aecab7f4159e97090f9200694

See more details on using hashes here.

Provenance

The following attestation bundles were made for joblet_sdk_python-1.1.4.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-1.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for joblet_sdk_python-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 758b215cc48454d4fe4d158343e4d1518e77d0ff5f80baf80516b2ba55a90081
MD5 e63cbb356262c08320a231d21d8b551f
BLAKE2b-256 777229d67d89de83d934f4e4fc6e219e4acd58b89866b48bf2cedce48c08f38b

See more details on using hashes here.

Provenance

The following attestation bundles were made for joblet_sdk_python-1.1.4-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