laituri — Docker Toolkit for Python
laituri is a set of Docker-related Python snippets used at Valohai.
You can use it with Python >= 3.8.
Usage
Configuration
You can configure your used Docker command if it is not the default docker, using laituri settings.
Example:
laituri.settings.DOCKER_COMMAND = 'docker'
Docker Credential Manager
Laituri contains a docker credentials manager which can be used for example when pulling images. It logs in and out using the Docker CLI.
Example:
from laituri.docker.credential_manager import get_credential_manager
my_credentials = {
'username': 'SmolShark1',
'password': 'sharksWithLazers',
}
with get_credential_manager(
image='python:latest',
registry_credentials=my_credentials,
log_status=print # Any callable
):
# Do your docker things!
Development
Installing editable library version in the current virtual environment.
# install this package and all development dependencies
pip install -e .[dev] pre-commit && pre-commit install
# manually run lint and type checks
pre-commit run --all-files
# manually run tests
pytest --cov
python
>>> import laituri; print(laituri.__version__)
Making a Release
A new release build is released by the CI when a new tag is pushed to the repository:
# bump version number in "laituri/__init__.py"
vim laituri/__init__.py
# pushing a new tag will trigger a new release build
git add .
git commit -m "Become to X.Y.Z"
git tag -a vX.Y.Z -m "Version X.Y.Z"
git push --follow-tags
If a manual release is needed, you can follow up the above steps with:
pip install build twine
git clean -fdx -e .idea/
python -m build .
twine upload dist/*
Release files for laituri 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| laituri-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / laituri-0.5.0-py3-none-any.whl
| Download URL | laituri-0.5.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae7cd8ed93bbb8e48f51cd0c3b364bedd22f5acfad716b3ea78e115ab6eb94a6
|
|
BLAKE2b-256 checksum How to use checksums |
e38ad79a80a102150b76b7ebe4bf03c1e40a58368461475c3d96511403432efd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 19, 2026.
Transparency log