dagger-io 0.20.3


pip install dagger-io

  Latest version

Released: Mar 19, 2026


Meta
Author: Dagger
Requires Python: >=3.10

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers

Framework
  • AnyIO
  • Pytest

Programming Language
  • Python
  • Python :: 3
  • Python :: 3 :: Only
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14

License
  • OSI Approved :: Apache Software License

Operating System
  • OS Independent

Typing
  • Typed

Dagger Python SDK

PyPI Version Conda Version Supported Python Versions License Code style Ruff

A client package for running Dagger pipelines.

What is the Dagger Python SDK?

The Dagger Python SDK contains everything you need to develop CI/CD pipelines in Python, and run them on any OCI-compatible container runtime.

Requirements

  • Python 3.10 or later
  • Docker, or another OCI-compatible container runtime

A compatible version of the Dagger CLI is automatically downloaded and run by the SDK for you, although it’s possible to manage it manually.

Installation

From PyPI, using pip:

pip install dagger-io

You can also install via Conda, from the conda-forge channel:

conda install dagger-io

Example

Create a main.py file:

import sys

import anyio
import dagger
from dagger import dag


async def main(args: list[str]):
    async with dagger.connection():
        # build container with cowsay entrypoint
        ctr = (
            dag.container()
            .from_("python:alpine")
            .with_exec(["pip", "install", "cowsay"])
        )

        # run cowsay with requested message
        result = await ctr.with_exec(["cowsay", *args]).stdout()

    print(result)


anyio.run(main, sys.argv[1:])

Run with:

$ python main.py "Simple is better than complex"
  _____________________________
| Simple is better than complex |
  =============================
                             \
                              \
                                ^__^
                                (oo)\_______
                                (__)\       )\/\
                                    ||----w |
                                    ||     ||

Note It may take a while for it to finish, especially on first run with cold cache.

If you need to debug, you can stream the logs from the engine with the log_output config:

config = dagger.Config(log_output=sys.stderr)
async with dagger.connection(config):
    ...

Learn more

Development

The SDK is managed with a Dagger module in ./dev. To see which tasks are available run:

dagger call -m dev

Common tasks

Run pytest in supported Python versions:

dagger call -m dev test default

Check for linting violations:

dagger call -m dev lint

Re-format code following common styling conventions:

dagger call -m dev format export --path=.

Update pinned development dependencies (run from this directory, ./sdk/python, or adjust export path accordingly):

dagger call -m ../../toolchains/python-sdk-dev dev-container with-exec --args uv,lock,-U directory --path . export --path .

Update a single pinned development dependency (run from this directory, ./sdk/python, or adjust export path accordingly):

dagger call -m ../../toolchains/python-sdk-dev dev-container with-exec --args uv,lock,-P,<DEPNAME> directory --path . export --path .

Build and preview the reference documentation:

dagger call -m dev docs preview up

Add --help to any command to check all the available options.

0.20.3 Mar 19, 2026
0.20.2 Mar 19, 2026
0.20.1 Mar 05, 2026
0.20.0 Feb 27, 2026
0.19.11 Feb 05, 2026
0.19.10 Jan 14, 2026
0.19.9 Jan 07, 2026
0.19.8 Dec 05, 2025
0.19.7 Nov 21, 2025
0.19.6 Nov 07, 2025
0.19.5 Nov 05, 2025
0.19.4 Oct 30, 2025
0.19.3 Oct 23, 2025
0.19.2 Oct 08, 2025
0.19.1 Oct 07, 2025
0.19.0 Sep 30, 2025
0.18.19 Sep 18, 2025
0.18.18 Sep 16, 2025
0.18.17 Sep 04, 2025
0.18.16 Aug 19, 2025
0.18.15 Aug 18, 2025
0.18.14 Jul 18, 2025
0.18.13 Jul 18, 2025
0.18.12 Jun 27, 2025
0.18.11 Jun 25, 2025
0.18.10 Jun 10, 2025
0.18.9 May 27, 2025
0.18.8 May 14, 2025
0.18.7 May 13, 2025
0.18.6 May 06, 2025
0.18.5 Apr 25, 2025
0.18.4 Apr 22, 2025
0.18.3 Apr 14, 2025
0.18.2 Apr 04, 2025
0.18.1 Apr 01, 2025
0.18.0 Apr 01, 2025
0.17.2 Mar 27, 2025
0.17.1 Mar 24, 2025
0.17.0 Mar 20, 2025
0.16.3 Mar 12, 2025
0.16.2 Feb 27, 2025
0.16.1 Feb 20, 2025
0.16.0 Feb 19, 2025
0.15.4 Feb 12, 2025
0.15.3 Jan 29, 2025
0.15.2 Jan 14, 2025
0.15.1 Dec 12, 2024
0.15.0 Dec 11, 2024
0.14.0 Nov 08, 2024
0.13.7 Oct 31, 2024
0.13.6 Oct 25, 2024
0.13.5 Oct 10, 2024
0.13.4 Oct 09, 2024
0.13.3 Sep 20, 2024
0.13.2 Sep 20, 2024
0.13.1 Sep 18, 2024
0.13.0 Sep 11, 2024
0.12.7 Sep 02, 2024
0.12.6 Aug 30, 2024
0.12.5 Aug 15, 2024
0.12.4 Aug 02, 2024
0.12.3 Jul 25, 2024
0.12.2 Jul 22, 2024
0.12.1 Jul 18, 2024
0.12.0 Jul 12, 2024
0.11.9 Jun 25, 2024
0.11.8 Jun 19, 2024
0.11.7 Jun 11, 2024
0.11.6 May 30, 2024
0.11.5 May 28, 2024
0.11.4 May 09, 2024
0.11.3 May 08, 2024
0.11.2 Apr 26, 2024
0.11.1 Apr 16, 2024
0.11.0 Apr 04, 2024
0.10.3 Mar 26, 2024
0.10.2 Mar 12, 2024
0.10.1 Mar 05, 2024
0.10.0 Feb 27, 2024
0.9.11 Feb 20, 2024
0.9.10 Feb 13, 2024
0.9.9 Feb 09, 2024
0.9.8 Feb 01, 2024
0.9.7 Jan 19, 2024
0.9.6 Jan 12, 2024
0.9.5 Dec 21, 2023
0.9.4 Dec 08, 2023
0.9.3 Nov 04, 2023
0.9.2 Oct 31, 2023
0.9.1 Oct 26, 2023
0.9.0 Oct 20, 2023
0.8.8 Oct 11, 2023
0.8.7 Sep 18, 2023
0.8.6 Sep 18, 2023
0.8.5 Sep 14, 2023
0.8.4 Aug 17, 2023
0.8.2 Aug 10, 2023
0.8.1 Aug 04, 2023
0.8.0 Aug 03, 2023
0.6.4 Jul 19, 2023
0.6.3 Jul 04, 2023
0.6.2 Jun 15, 2023
0.6.1 Jun 02, 2023
0.6.0 May 25, 2023
0.5.4 May 18, 2023
0.5.3 May 11, 2023
0.5.2 Apr 28, 2023
0.5.1 Apr 08, 2023
0.5.0 Apr 07, 2023
0.4.2 Mar 23, 2023
0.4.1 Mar 16, 2023
0.4.0 Mar 08, 2023
0.3.3 Feb 24, 2023
0.3.2 Feb 08, 2023
0.3.1 Jan 26, 2023
0.3.0 Jan 09, 2023
0.2.1 Dec 01, 2022
0.2.0 Nov 23, 2022
0.1.1 Nov 10, 2022
0.1.0 Nov 09, 2022
0.1.0a1 Nov 09, 2022

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras: None
Dependencies:
anyio (>=3.6.2)
cattrs (>=25.1.0)
gql[httpx] (>=4.0)
httpcore (>=1.0.8)
beartype (>=0.22.0)
platformdirs (>=2.6.2)
typing-extensions (>=4.13.0)
rich (>=10.11.0)
opentelemetry-sdk (>=1.23.0)
opentelemetry-exporter-otlp-proto-http (>=1.23.0)
opentelemetry-instrumentation-logging (>=0.54b1)
exceptiongroup (>=1.3.0)