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.5.tar.gz (57.2 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.5-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: joblet_sdk_python-1.1.5.tar.gz
  • Upload date:
  • Size: 57.2 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.5.tar.gz
Algorithm Hash digest
SHA256 c58df0d40cfb24426dfb0ad2680b44a686b8c61c2116da82173f4660d000dbc6
MD5 1d1f73207c3c8d81d5b87101bc476308
BLAKE2b-256 987ed65c99a4e8eea95f2493aec27097705b23aabc23e70d7f33239060a332e1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for joblet_sdk_python-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a6c2571567ba799383e58c27b0393f63964ba204d079db67076244dd486a4131
MD5 11f05b6e8bd70ec0ba99636c8256e5aa
BLAKE2b-256 a7b37a582952af3b064e6c635ae379c723e84fc0b0ee029b3637bcee53b50b6b

See more details on using hashes here.

Provenance

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