werkflow-docker
Version 0.4.0
Asynchronous Docker client, CLI build options, and fluent Dockerfile Image builder module for Werkflow.
Installation
pip install werkflow-docker
Features
- Async Docker SDK & CLI Wrapper (
Docker.client/DockerClient): Async image build, tag, push, pull, login, container lifecycle, and registry operations. - Fluent Dockerfile Builder (
Image): Programmatically construct, parse (from_string(),from_file()), query (layers()), resolve build args/env vars (resolve()), and export (to_string(),to_file(),to_memory_file(),to_context()) multi-stage Dockerfiles with typed layer models (Stage,Arg,Env,Copy,Add,Run,Cmd,Entrypoint,Expose,Label,Workdir,User,Volume,Healthcheck,Shell,StopSignal,OnBuild, and BuildKit mounts). - Typed CLI Build Options (
BuildOptions): Pydantic v2 validation for--platform,--build-arg,--label,--secret,--cache-from,--add-host,--no-cache,--pull,--squash, and more viato_string(). - Async Lifecycle: Supports
async with Docker() as docker:,await docker.close(), anddocker.abort().
Usage
from werkflow_docker import BuildOptions, Docker, Image
image = (
Image("my-service", tag="1.0.0")
.stage("python:3.12-slim", alias="builder")
.workdir("/app")
.env("PYTHONUNBUFFERED", "1")
.copy("pyproject.toml", "/app/")
.run("pip install .")
)
opts = BuildOptions(platform="linux/amd64", no_cache=True)
print(opts.to_string())
print(image.to_string())
async with Docker() as docker:
loaded = await docker.load_image("./Dockerfile", image_name="my-service")
Dependencies
werkflow-corewerkflow-shellwerkflow-systemdockerpydantic
Requirements
- Python
>=3.11 - Local Docker daemon / CLI for build and container operations
Metadata
Release files for werkflow-docker 0.4.1
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 |
|---|---|---|---|---|
| werkflow_docker-0.4.1.tar.gz | 23.1 kB | Without provenance | Details for werkflow_docker-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| werkflow_docker-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for werkflow_docker-0.4.1-py3-none-any.whl |
Total release size: 61.5 kB
Release files / werkflow_docker-0.4.1.tar.gz
| Download URL | werkflow_docker-0.4.1.tar.gz |
|---|---|
| Size | 23.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cba441c4c166bcc20d4554ee7b57ddb36387f5602c69bd8547760890385eca9c
|
|
BLAKE2b-256 checksum How to use checksums |
16f16365fbb863204885ef6ff2e08375aed79a3c89ed98c50e05ce141f9d5ed2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Release files / werkflow_docker-0.4.1-py3-none-any.whl
| Download URL | werkflow_docker-0.4.1-py3-none-any.whl |
|---|---|
| Size | 38.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55ffce51b5cfc3cf830464493ec6f60d282381cc02bd08ab1b550f23e73c5809
|
|
BLAKE2b-256 checksum How to use checksums |
41e105394f12777cb7245ef0191521f6561e5855198f2c255cd1fd671f115732
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Security for werkflow-docker 0.4.1
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.