Skip to main content

Project generated with PyScaffold Coveralls PyPI-Server

k8s-job-scheduler

A package for managing Kubernetes jobs and cron jobs from Python. It allows running CLI scripts and Python functions within native Kubernetes job engine. No need to package separate Docker images with functions to be executed - the package can remotely "inject" the Python function using dill into publicly available Docker images.

Installation

pip install k8s-job-scheduler

Getting Started

from k8s_job_scheduler import JobManager

def add(a, b):
    return a + b

manager = JobManager(docker_image="python:3.11.1-slim-bullseye")
job = manager.create_instant_python_job(add, 1, 2)

This example will create a Kubernetes job and run the function add with arguments 1 and 2 inside Python Docker container.

Other Prerequisites

Executing Python functions withing Kubernetes containers

  • Docker images should include Python interpreter and all the dependencies required to execute the function.
  • dill package is used to send the execution function and it's arguments when Docker container is created. dill is dynamically installed on job container execution start when job is created with create_instant_python_job. You can use pip_packages argument to add extra Python packages to be installed, or remove dill if you use docker image with preinstalled dill.

Metadata

Release files for k8s-job-scheduler 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for k8s-job-scheduler 0.2.3
File Size Uploaded Provenance Actions
k8s_job_scheduler-0.2.3.tar.gz 28.1 kB Without provenance Details for k8s_job_scheduler-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for k8s-job-scheduler 0.2.3
File Interpreter ABI Platform Actions
k8s_job_scheduler-0.2.3-py3-none-any.whl Python 3 none any Details for k8s_job_scheduler-0.2.3-py3-none-any.whl

Total release size: 38.1 kB

Release files / k8s_job_scheduler-0.2.3.tar.gz

Download URL k8s_job_scheduler-0.2.3.tar.gz
Size 28.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e45703cfc82b8f254d841a3128f762b9470a46383aa84cb6862fabff58868771
BLAKE2b-256 checksum
How to use checksums
7867bc6697f492b9074af3fbbbd86c80cfeae40e889619fe7d89f38ca7add7f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / k8s_job_scheduler-0.2.3-py3-none-any.whl

Download URL k8s_job_scheduler-0.2.3-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
403ee7201a7d3c6d8a641587d928295b09da83db8fedc01e73be7b36ab01bda6
BLAKE2b-256 checksum
How to use checksums
5796e9d5e583f548af3bf3ea11ce863228fcbf7f46fc803f18f50c2a2a322a82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Security for k8s-job-scheduler 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page