dagger-io
A client package for running Dagger pipelines in Python.
What it is and what it does
Dagger Python SDK lets you write CI/CD pipelines as Python code that runs on any OCI-compatible container runtime. Instead of writing declarative YAML or shell scripts, you define pipeline steps using a fluent Python API—building containers, executing commands, and chaining operations together. The SDK handles container lifecycle management and automatically downloads and runs the Dagger CLI engine for you.
It's built on async/await primitives (via anyio) and integrates with OpenTelemetry for observability. The package requires Python 3.10 or later and a running container runtime like Docker. It has 13 runtime dependencies including gql for GraphQL communication, httpcore for networking, and rich for terminal output formatting.
Use it for:
- Define multi-stage build pipelines in Python that run in isolated containers without manual Docker CLI calls.
- Automate testing, linting, and deployment workflows as type-checked Python code instead of shell scripts.
- Build and push container images programmatically with full control over layer caching and dependency management.
- Create reusable pipeline modules in Python that can be versioned and tested like regular application code.
- Debug CI/CD logic locally before committing, using the same Python runtime as your production pipeline.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Dagger Python SDK is a client for defining and running CI/CD pipelines in Python, executing them on any OCI-compatible container runtime without requiring manual container orchestration.
Yes. Dagger Python SDK is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It's suitable for teams wanting to write CI/CD pipelines as Python code. Install it if you want to replace shell scripts and YAML with type-safe, testable Python—but only if you have Docker or another OCI runtime available and are comfortable with async Python.
Install
dagger-io on PyPI
pip
pip install dagger-iouv
uv add dagger-iopoetry
poetry add dagger-ioInstalling dagger-io
Before you install
Low install friction with a pure-wheel distribution. Active maintenance with a release 16 days ago and a commit history through 2026-08-14. Requires Python 3.10 or later and Docker or another OCI-compatible runtime; the SDK automatically manages the Dagger CLI for you.
License in practice
Licensed under Apache Software License (permissive), which allows commercial and private use with minimal restrictions—suitable for most production and open-source projects.
Quickstart
pip install dagger-io
import anyio
import dagger
from dagger import dag
async def main():
async with dagger.connection():
ctr = dag.container().from_("python:alpine")
result = await ctr.with_exec(["echo", "hello"]).stdout()
print(result)
anyio.run(main)
Requires Python 3.10 or later and Docker or another OCI-compatible container runtime installed and running on your system.
Verify before relying
- Whether the SDK's automatic Dagger CLI download works reliably in air-gapped or restricted network environments.
- Performance characteristics and resource overhead when running many concurrent pipelines.
- Compatibility with container runtimes other than Docker (e.g., Podman, containerd) beyond the 'OCI-compatible' claim.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 13 — anyio, cattrs, gql, yarl, httpcore, beartype, platformdirs, typing-extensions, rich, opentelemetry-sdk, opentelemetry-exporter-otlp-proto-http, opentelemetry-instrumentation-logging, exceptiongroup |
| Maintenance | actively maintained — 16 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 240,161/month — #8,909 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dagger_io-0.21.8-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
hera-workflowsHera is a Python SDK that turns Python…
permissive · top 15,000 on PyPI
adagioAdagio provides a directed acyclic graph (DAG)…
permissive · top 5,000 on PyPI
heraHera is a Python SDK that turns Python…
permissive · top 5,000 on PyPI
apache-airflow-providers-dockerIntegrates Docker container execution into…
permissive · top 5,000 on PyPI
buildkite-sdkA Python SDK for interacting with Buildkite's…
unclear · top 15,000 on PyPI
opsA Python framework for developing…
permissive · top 15,000 on PyPI
delegator.pyDelegator.py wraps subprocess execution with a…
permissive · top 15,000 on PyPI
prefect-dbtPrefect integration that orchestrates dbt…
permissive · top 15,000 on PyPI
coredisAn async Redis client with full type hints,…
permissive · top 5,000 on PyPI
kfp-server-apiProvides Python client bindings for the…
permissive · top 5,000 on PyPI