skillfed

dagger-io

A client package for running Dagger pipelines in Python.

dagger-io v0.21.8 240.2K downloads/30d#8,909 on PyPI16,163
Permissive license Active released

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-io

uv

uv add dagger-io

poetry

poetry add dagger-io

Installing 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

Development Status :: 5 - Production/StableFramework :: AnyIOFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Tags

python ci/cd pipeline frameworkcontainer-based workflow automationdagger python clientoci container pipeline toolpython devops orchestration
ci-cdcontainer-orchestrationasync-python

More Build Tools packages