PyCon India 2025

Workshop: Building Modern CI Pipelines in Python
2025-09-12 , Room 3

CI is no longer a simple chain of shell commands. In modern, polyglot organizations, CI workflows must be modular, reusable, and capable of interoperating across multiple languages and teams. Yet many teams still default to YAML or brittle bash scripts, especially in Python projects.

What if you could ditch the YAML and write your pipelines in pure, testable, idiomatic Python?

This hands-on workshop will explore how to build modular, language-agnostic CI pipelines in Python using Dagger, an open source runtime created by the founders of Docker that treats pipelines as code.

You’ll learn how to:
- Build CI pipelines using Python (no more YAML!)
- Reuse logic across teams and projects with Dagger modules
- Seamlessly integrate Go, TypeScript, and other languages into Python pipelines

Whether you're writing CI for your next Flask app or scaling a CI platform for a large engineering org, Dagger can unlock a smoother CI experience.


Audience

This workshop is for:
- Python developers who want better control over their CI/CD workflows
- DevOps/SRE engineers working in polyglot or monorepo environments
- Engineering teams tired of CI YAML fatigue and Bash script burnout

Prerequisites

  • Basic Python experience. No prior CI/CD or Dagger knowledge required.
  • A laptop with IDE, Docker and the Dagger CLI installed.
  • A GitHub account

What you will learn:

  • Why Python is a great fit for modern CI pipeline development
  • How to use Dagger's Python SDK to write, run, and test pipelines
  • How to compose Python pipelines with other language modules (Go, TypeScript, etc.)
  • How to refactor brittle CI scripts into clean, reusable Python components
  • How to run Daggerized pipelines written in Python locally and in CI

Workshop agenda

Dagger Introduction (15 minutes)

  • Review common challenges in CI today
  • Explore how Dagger's design elegantly solves these challenges
  • Understand Dagger’s role in modern, polyglot development environments and teams

Understand the Example Project (15 minutes)

  • Clone an example application codebase from GitHub
  • Examine the existing Dockerfile to understand the current build process
  • Examine the existing GitHub Actions workflow to understand how the pipeline works in CI

Dagger CLI and Dagger Cloud (10 minutes)

  • Explore the Dagger CLI, your primary interface to Dagger in this workshop
  • Understand Dagger Cloud

Create a Simple Dagger Module (20 minutes)

  • Create a Dagger module for a basic task.
  • Understand module structure and how to use it
  • Run a Dagger function and trace it using the terminal and Dagger Cloud

Daggerize the Pipeline! (40 minutes)

  • Daggerize! Convert the Dockerfile to a Dagger pipeline

Run the Dagger Pipeline Locally (10 minutes)

  • Run the Dagger pipeline locally and trace its execution
  • Run it again to see Dagger caching in action
  • Understand how caching in Dagger speeds up subsequent builds

Transfer and run the Dagger Pipeline in CI (20 minutes)

  • Modify the GitHub Actions workflow to use the Dagger pipeline
  • Run the pipeline in the GitHub Actions CI environment
  • Understand how Dagger eliminates vendor lock-in and CI switching costs

Add AI to the Mix (30 minutes)

  • Examine Dagger's AI bindings
  • See an example of integrating AI to analyse pipeline failures

Summary and Q&A (15 minutes)

  • Recap of Dagger's key features and benefits for CI/CD
  • Q&A

Key takeaways:

After this workshop, attendees will be able to:
- Write modern, reproducible and portable CI workflows in Python
- Replace static YAML with testable, version-controlled code
- Collaborate more effectively with teams using different stacks
- Use Dagger to future-proof their CI strategy

Useful links


Prerequisites

Basic Python experience. A laptop with IDE, Docker and the Dagger CLI installed. A GitHub account. No prior CI/CD or Dagger knowledge required.

Target Audience

Intermediate

Vikram Vaswani is an open source developer and technical author with 22+ years of experience. He has written seven books on open source software and database programming for McGraw-Hill and Pearson. He is also well-versed in open source product management, product marketing and community management.

GitHub: https://github.com/vvaswani
LinkedIn: https://www.linkedin.com/in/vvaswani/
Website: https://vikram-vaswani.in