Registry / devops / dagger-io

dagger-io

JSON →
library0.21.7pypypi✓ verified 90d ago

A Python client for running Dagger CI/CD pipelines. Provides a programmable engine for containerized workflows. Current version: 0.20.6. Release cadence: frequent, often weekly.

pip install dagger-io
INSTALL
IMPORT
SIG · DAGGER-IO
D
dagger-io
devopspythonv0.21.7
Install
7.0s avg
Import
2746ms
Disk
64MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.21.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 8s
py 3.11
✓ —
✓ 7.4s
py 3.12
✓ —
✓ 6.2s
py 3.13
✓ —
✓ 6.3s
py 3.9
✕ build_error
✕ build_error
64MB installed
● package 64MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dagger
✓ import dagger
The correct import is simply 'import dagger'.
Connection
✓ from dagger import Connection
Connection is the main entrypoint for executing pipelines.
Client
✓ from dagger import Client
Client is used within Connection context to interact with the Dagger engine.

Minimal example: connects to Dagger engine, runs 'python -V' in a container, prints version.

import dagger async def main(): async with dagger.Connection() as client: python = ( client.container() .from_("python:3.11-slim") .with_exec(["python", "-V"]) ) version = await python.stdout() print(f"Python version: {version}") if __name__ == "__main__": import asyncio asyncio.run(main())
Debug
Known issues
breakingPython SDK requires Python >=3.10. Older Python versions will cause import or runtime errors.
fix
Ensure your Python version is 3.10 or later.
affects: all versions
gotchaThe Dagger engine must be running (via 'dagger run' or 'dagger session') before using the SDK. If not, you'll get a connection error.
fix
Start the Dagger CLI or use 'dagger run' to execute your Python script.
affects: all versions
gotchaAll methods that interact with the engine (e.g., container().from_()) are async. Forgetting 'await' or not running inside an async context will cause RuntimeError or infinite hang.
fix
Use 'async with dagger.Connection() as client' and await all coroutines.
affects: all versions
Errors
Common errors & fixes
grpc.FutureTimeoutError: Dagger engine not reachable
Dagger engine is not running or not accessible.
fix
Ensure Dagger CLI is installed and run 'dagger session' or 'dagger run' before executing the script.
ImportError: cannot import name 'Connection' from 'dagger'
Outdated or wrong installation (e.g., installed 'dagger' instead of 'dagger-io').
fix
Uninstall the wrong package: pip uninstall dagger and install dagger-io: pip install dagger-io
RuntimeError: This event loop is already running
Trying to run async code in a non-async main or within an already running loop.
fix
Use asyncio.run(main()) in the script entry point.
Upgrade
Version history
0.21.7latest on PyPI · released Jun 17, 2026
Audit
Dependencies
grpciorequiredRequired for gRPC communication with Dagger engine
anyiorequiredAsync runtime used by the SDK
Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
dagger-io — pip install dagger-io · libregistry