ol-concourse-lib
A Python DSL for programmatically building Concourse CI/CD pipelines.
Instead of writing YAML files by hand, use typed Python classes to construct type-safe pipeline definitions that serialize to valid Concourse pipeline YAML.
Installation
pip install ol-concourse-lib
# or with Pulumi job builder support:
pip install "ol-concourse-lib[pulumi]"
Quick Start
from ol_concourse.lib.models.pipeline import Identifier
from ol_concourse.lib.resources import git_repo, registry_image
from ol_concourse.lib.resource_types import packer_build
from ol_concourse.lib.jobs.infrastructure import packer_jobs
import yaml, json
# Build a pipeline fragment for packer AMI builds
code = git_repo(
name=Identifier("packer-templates"),
uri="https://github.com/myorg/packer-templates",
branch="main",
)
fragment = packer_jobs(
dependencies=[],
image_code=code,
node_types=["web", "worker"],
)
pipeline = fragment.to_pipeline()
print(yaml.dump(json.loads(pipeline.model_dump_json())))
API
Models (ol_concourse.lib.models)
Pipeline— root pipeline definitionJob,Resource,ResourceType— core pipeline componentsGetStep,PutStep,TaskStep,InParallelStep— step typesTaskConfig,Command,Input,Output— task configurationPipelineFragment— composable pipeline unit
Builder Functions
| Module | Functions |
|---|---|
ol_concourse.lib.resources |
git_repo, registry_image, github_issues, schedule, s3_object, … |
ol_concourse.lib.resource_types |
packer_build, packer_validate, pulumi_provisioner_resource, github_issues_resource, github_deployments_resource, release_resource_type, … |
ol_concourse.lib.jobs.infrastructure |
packer_jobs, pulumi_jobs_chain, pulumi_job |
ol_concourse.lib.containers |
container_build_task |
ol_concourse.lib.notifications |
notification (Slack) |
ol_concourse.lib.tasks |
instance_refresh_task, block_for_instance_refresh_task |
Regenerating Pipeline Models
models/pipeline.py is generated from the Concourse pipeline JSON schema:
pip install datamodel-code-generator
datamodel-codegen \
--url https://raw.githubusercontent.com/nicholasdille/concourse-jsonschema/main/concourse.json \
--output src/ol_concourse/lib/models/pipeline.py \
--output-model-type pydantic_v2.BaseModel
License
BSD-3-Clause — Copyright MIT Open Learning
Metadata
Release files for ol-concourse 0.19.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ol_concourse-0.19.0.tar.gz | 71.5 kB | Without provenance | Details for ol_concourse-0.19.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ol_concourse-0.19.0-py3-none-any.whl | Python 3 | none | any | Details for ol_concourse-0.19.0-py3-none-any.whl |
Total release size: 133.2 kB
Release files / ol_concourse-0.19.0.tar.gz
| Download URL | ol_concourse-0.19.0.tar.gz |
|---|---|
| Size | 71.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07d9852512f6be3019c5481ebb4782afee9731f8cf5febb3b5be8e23e9b13d09
|
|
BLAKE2b-256 checksum How to use checksums |
faf1bc3b3e09254b778c17e3a26463c5b0e5b616111010c8f1cd00e0a4c2f00e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / ol_concourse-0.19.0-py3-none-any.whl
| Download URL | ol_concourse-0.19.0-py3-none-any.whl |
|---|---|
| Size | 61.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b391301df3af0888cd16724ad0b65dccc6d93f62ca5cc078c075a5a289aa3795
|
|
BLAKE2b-256 checksum How to use checksums |
6b2411e8f114654c87d6ea604713efc28eff1a802e235a0dde011598a0506ed4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for ol-concourse 0.19.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.