Wetlands
Wetlands lets a Python application run functions and external commands in separate Pixi environments.
This is useful when one application needs libraries whose dependencies cannot be installed together. Wetlands creates the environments, keeps worker processes ready for repeated calls, transfers ordinary Python values between the application and workers, and supervises commands and services installed in an environment.
Wetlands is intended for code you trust. Environments prevent dependency conflicts, but they do not restrict what code can access on your computer.
Install
pip install wetlands
Install the optional NumPy support when arrays cross the worker boundary:
pip install "wetlands[shared-memory]"
Run a task
from wetlands import EnvironmentManager, EnvironmentSpec
with EnvironmentManager(root="wetlands") as manager:
environment = manager.provision(
"first-example",
EnvironmentSpec(python="3.12.*"),
).wait_for()
with environment.start() as workers:
result = workers.execute_import(
"builtins:sum",
args=([20, 22],),
)
print(result) # 42
The first run may download Pixi and Python packages and can take several minutes.
Continue with the first-task tutorial or browse the complete documentation. Existing Wetlands 1 users should read the migration guide.
Development
Install the development environment:
uv sync --frozen --group dev --extra shared-memory
Run the fast tests and static checks:
uv run --extra shared-memory pytest -m "not integration and not compat and not manual"
uv run ruff check
uv run ruff format --check
uv run mypy src/wetlands
Start with the contributor setup and validation guide. The architecture guide explains the runtime design. Maintainers should follow RELEASING.md when publishing a release.
Wetlands is licensed under the MIT License. Read the security policy before executing third-party worker code, managed commands, or post-install commands.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wetlands-2.4.0.tar.gz.
File metadata
- Download URL: wetlands-2.4.0.tar.gz
- Upload date:
- Size: 330.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2e076c61d59f0cf68e75735749453aca80851d575cc7ca12947cadb7cfc48b0
|
|
| MD5 |
e197339f2341c7fea53c5e9445e10661
|
|
| BLAKE2b-256 |
89841af181390d1a6bfa7c0ffa3b5e8de0d4803a910748c98a78ad697ffa6fa5
|
File details
Details for the file wetlands-2.4.0-py3-none-any.whl.
File metadata
- Download URL: wetlands-2.4.0-py3-none-any.whl
- Upload date:
- Size: 134.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a6377c62750338c7675183e627bafca001f025b62beb046b09398864e3ca1fb
|
|
| MD5 |
869b4520cafa1a254689e0ef9be77712
|
|
| BLAKE2b-256 |
df7755ab35cb2cbfb230a7c2d1102203307fd2a75133e46a7fd79e06ce305744
|