Size icon
Assert icon
WorkingDirectory icon
Script icon
Docker icon
Commands icon
Webhook icon

Build a hashed Python wheelhouse and prove offline installation

Build a hash-locked Python wheelhouse, prove installation with Docker networking disabled, and export wheels, hashes and an installation report.

Categories
Infrastructure

A successful download does not prove a deployment can install without internet. This flow downloads a fully locked wheel set, installs it in a fresh venv inside a network-disabled container, checks dependencies, then publishes the bundle.

How it works

  1. Upload a trusted hash lock or pass its stored file URI through the keyed webhook.
  2. Validate exact pins and SHA256 hashes; record the target interpreter and platform.
  3. Download wheels from PyPI with --require-hashes and --only-binary=:all:.
  4. A separate Docker task with networkMode: none installs using --no-index and local wheels only. A fresh venv and --ignore-installed prevent preinstalled packages from hiding an incomplete wheel set. Run pip check and pip inspect.
  5. Publish a ZIP, per-file SHA256 manifest and pip installation report only after success.

What you get

  • Wheels, the original lock, runtime details, installed metadata and reports in one ZIP.
  • An offline installation check for the worker's Linux architecture and chosen image.
  • Source distributions, bad hashes and missing dependencies fail before publication.

Who it's for

  • Platform engineers preparing Python dependencies for restricted-network deployments.

Why orchestrate this with Kestra

Shared working-directory tasks separate online download from an isolated install. Task states show which stage failed, and only verified artifacts become flow outputs. No source builds or application imports are used as substitutes for installation.

Prerequisites

  • Docker-enabled Kestra workers and the Python scripts plugin.
  • A trusted Linux Python image providing pip, venv and pip inspect; the default is Python 3.13. Pin the deployment image by digest for repeatable runtime selection.
  • A UTF-8 lock of at most 64 KiB with 1-100 distributions, including all dependencies. Each entry must use package==version --hash=sha256:.... Multiple SHA256 hashes, extras, comments and backslash continuations are supported; URLs, includes, global pip options and environment markers are deliberately unsupported.
  • Network access to PyPI during download, disk space for the chosen wheels and a final file set of at most 256 MiB. This does not scan packages for vulnerabilities.

Secrets

  • WHEELHOUSE_WEBHOOK_KEY: Authentication key for automated lock submissions.

Quick start

  1. Configure the secret and execute with your trusted, complete hash lock.
  2. Download the wheelhouse and inspect its manifest and installation report.
  3. Unzip on the matching target platform and install using the same offline pip flags. A producer can call the webhook with requirements set to its kestra:///... lock URI.

How to extend

  • Upload successful bundles to your artifact store or add vulnerability scanning before publication.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.