hatch-containers
| CI/CD | |
| Package | |
| Meta |
This provides a plugin for Hatch that allows the use of containerized environments.
Table of Contents
Installation
pip install hatch-containers
Configuration
The environment plugin name is container.
-
pyproject.toml
[tool.hatch.envs.<ENV_NAME>] type = "container"
-
hatch.toml
[envs.<ENV_NAME>] type = "container"
Python
If the Python version is set to a multi-character integer like 310 then it will be interpreted as its <MAJOR>.<MINOR> form e.g. 3.10.
If not set, then the <MAJOR>.<MINOR> version of the first python found along your PATH will be used, defaulting to the Python executable Hatch is running on.
Image
The image option specifies the container image to use e.g. python:alpine. It recognizes the placeholder value {version} which will be replaced by the value of the Python option.
Default:
[envs.<ENV_NAME>]
image = "python:{version}"
Command
The command option specifies the command that the container will execute when started.
Default:
[envs.<ENV_NAME>]
command = ["/bin/sleep", "infinity"]
Startup
By default, containers will be started automatically when entered or when running commands and will be stopped immediately after. If you want containers to start automatically upon creation and not be stopped until removal, you can set start-on-creation to true.
Default:
[envs.<ENV_NAME>]
start-on-creation = false
Shell
The shell option specifies the executable that will be used when entering containers. By default, this is set to /bin/bash unless alpine is in the image name, in which case /bin/ash will be used instead.
Notes
- There must be a
dockerexecutable along yourPATH. - The
env-excludeenvironment variable filter has no effect.
Future
- Support for Windows containers
- Support for building images
License
hatch-containers is distributed under the terms of the MIT license.
Metadata
Release files for hatch-containers 0.7.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 |
|---|---|---|---|---|
| hatch_containers-0.7.0.tar.gz | 12.8 kB | Without provenance | Details for hatch_containers-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hatch_containers-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for hatch_containers-0.7.0-py3-none-any.whl |
Total release size: 20.8 kB
Release files / hatch_containers-0.7.0.tar.gz
| Download URL | hatch_containers-0.7.0.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c96e1ef117b11591308697556052ce9d000895c13a70127904d114854e1c034
|
|
BLAKE2b-256 checksum How to use checksums |
066c22695c02e29d00381ec655578ef2895eadbae0d302379c3dc3231a8c3321
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.13
|
Release files / hatch_containers-0.7.0-py3-none-any.whl
| Download URL | hatch_containers-0.7.0-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1988e8e763583ade5107941fbd61a95c2967b6360dc6a76b75b83718ce5420f7
|
|
BLAKE2b-256 checksum How to use checksums |
bad64bb3367a4bf9c197ee087929c54e622efe7113bc9e4c74fd9545af9e6fd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.13
|
Security for hatch-containers 0.7.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.