runpod-doc-worker

Overview

Understand what runpod-doc-worker provides and what your RunPod document worker still needs to implement.

runpod-doc-worker is a Python package for the engine-independent parts of a RunPod document-processing worker. It resolves document inputs, checks outbound targets, declares output artifacts, packages results, writes structured logs, and exposes diagnostic helpers.

The package does not include a RunPod handler or a document engine. A worker repository supplies those parts and decides its public request and response contract.

Pre-release API

Version 0.1.0 is usable, but its API is expected to move. Pin a release tag and review the changelog before upgrading.

What the package owns

AreaIncluded behavior
Input transportURL, base64, and volume-path resolution with size and path checks
Network checksHTTP target resolution and checked direct connections
Artifact contractsDeclarative text, json, and b64map result extraction
Result packagingInline output, base64 archives, and optional S3 upload
ObservabilityOne-line logs, job ID context, redaction helpers, and diagnostics
Worker validationFocused checks for RunPod Hub metadata and test fixtures

What your worker owns

Your worker still defines:

  • the engine and its dependencies;
  • the RunPod handler and entry point;
  • validation for the public job schema;
  • the response envelope exposed to callers;
  • the container image, endpoint configuration, and deployment process.

This boundary keeps model-specific names and behavior out of the shared package. A worker running a different engine should be able to reuse the same modules unchanged.

Start with the adoption path

On this page