Back to articles
Dagger Has a Free API: Write CI/CD Pipelines in Go, Python, or TypeScript Instead of YAML

Dagger Has a Free API: Write CI/CD Pipelines in Go, Python, or TypeScript Instead of YAML

via Dev.to PythonAlex Spinov

Dagger lets you write CI/CD pipelines as code in Go, Python, or TypeScript instead of YAML. Every step runs in a container, so pipelines work identically on your laptop and in any CI system. Why Dagger? Code, not YAML — write pipelines in real programming languages Portable — same pipeline runs on GitHub Actions, GitLab, Jenkins, locally Cacheable — automatic content-addressed caching Composable — reuse pipeline modules from the community GraphQL API — query and control pipelines programmatically Install # Install Dagger CLI curl -L https://dl.dagger.io/dagger/install.sh | sh # Initialize in your project dagger init --sdk = python # or: --sdk=go, --sdk=typescript Python Pipeline # dagger/src/main.py import dagger from dagger import dag , function , object_type @object_type class MyPipeline : @function async def test ( self , source : dagger . Directory ) -> str : \ " \"\" Run tests \"\"\" return await ( dag.container() .from_( \" python:3.12-slim \" ) .with_directory( \" /app \" , sour

Continue reading on Dev.to Python

Opens in a new tab

Read Full Article
2 views

Related Articles