pydra
pydra is a high-performance, resilient Python framework for building Kubernetes Dynamic Resource Allocation (DRA) hardware drivers.
By handling the intricate, low-level Kubernetes gRPC node plumbing natively in Python, pydra eliminates the need for hardware vendors to maintain complex Go codebases or fragile Cgo wrappers just to expose their chips to the cluster control plane.
Overview
Traditional Kubernetes device plugins require Go. However, the AI hardware ecosystem—encompassing PJRT, OpenXLA, PyTorch, JAX, and vendor monitoring tools—is natively Python-centric. pydra bridges this gap, allowing infrastructure engineers to write production-grade, topology-aware scheduling drivers utilizing the exact same Python SDKs running the AI workloads.
Architecture: Microkernel Design
pydra enforces a strict separation between Kubernetes protocol mechanics and raw silicon management.
[ Kubernetes Kubelet ]
|
| (gRPC over Unix Domain Socket)
v
+-------------------------------------------------------+
| pydra-core (The Library) |
| |
| - UDS gRPC Server Engine - Unix Signal Handling |
| - Kubelet Plugin Registry - Retries & Backoffs |
| - CDI Spec Validator - Robust Error Boundary |
+-------------------------------------------------------+
|
| (Python Abstract Base Class / Inheritance)
v
+-------------------------------------------------------+
| Hardware Drivers (Independent) |
| |
| pydra-tpu pydra-nvidia pydra-amd |
| (Imports JAX/SDK) (Imports NVML) (Imports SMI) |
+-------------------------------------------------------+
1. pydra-core
The engine of the framework. It operates completely agnostic of specific hardware types.
- Resilient UDS Server: Manages connection lifecycles, socket cleanups on termination, and maps incoming Kubelet DRA requests into structured Python primitives.
- Exception Shielding: If a hardware vendor's underlying C-library throws a segmentation fault or an unhandled exception during allocation,
pydra-corecatches it, emits a high-fidelity diagnostic trace, and reports a clearTerminalErrorback to the Kubelet to prevent hung pods. - CDI Generator: Provides a fluid API to assemble and validate Container Device Interface (CDI) v1.1.0 specs before writing them to the node.
2. pydra-plugins
Lean, independent packages that inherit from the core.
- Deep Telemetry: Queries the physical hardware directly via native SDKs (
libtpu.sdk,pynvml, etc.) to expose HBM memory capacity, link errors, and real-time topology layout back to the scheduler viaResourceSlices. - Custom Slicing Logic: Translates generic user scheduling requests into exact hardware configurations (e.g., configuring an NVIDIA MIG profile or partitioning a TPU v5e mesh topology).
Metadata
Release files for kubernetes-pydra 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kubernetes_pydra-0.1.0.tar.gz | 16.6 kB | With provenance | Details for kubernetes_pydra-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kubernetes_pydra-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for kubernetes_pydra-0.1.0-py3-none-any.whl |
Total release size: 36.8 kB
Release files / kubernetes_pydra-0.1.0.tar.gz
| Download URL | kubernetes_pydra-0.1.0.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
082d672f3999bf19814f4da0d5183db39c07ae2bf38ed9958a72825d230e6a88
|
|
BLAKE2b-256 checksum How to use checksums |
06742c46e0e50938fbea7e715c2d4fda18e5f50ed7937ca9c348653ba08fad8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.
Transparency logRelease files / kubernetes_pydra-0.1.0-py3-none-any.whl
| Download URL | kubernetes_pydra-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14f07f2b0a89939bc801e2efdbee7f86d2c7224d14a1fa31768206fba96feb73
|
|
BLAKE2b-256 checksum How to use checksums |
53c672fae92fe67394c31e2de4dc8a004a80e1b3d785cdb623e988bc2c22f057
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.
Transparency logSecurity for kubernetes-pydra 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for kubernetes_pydra-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.
Transparency logA 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.