Skip to main content

Wetlands

Wetlands tests Wetlands PyPI Wetlands Python versions

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

Wetlands transfers NumPy array data between the application and workers through operating-system shared memory automatically. Install the optional host-side NumPy support when arrays cross the worker boundary:

pip install "wetlands[shared-memory]"

Also include NumPy in each managed worker environment that receives or returns arrays. Your code uses ordinary, independently owned arrays; it never manages shared-memory handles directly. See NumPy arrays and shared-memory transport for the complete transfer model.

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.

Metadata

Release files for wetlands 2.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wetlands 2.4.1
File Size Uploaded
wetlands-2.4.1.tar.gz 334.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wetlands 2.4.1
File Interpreter ABI Platform
wetlands-2.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 470.0 kB

Release files / wetlands-2.4.1.tar.gz

Download URL wetlands-2.4.1.tar.gz
Size 334.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d4b6faca145d7c7e01fe4918a920556ce159f2c727ba0feea10da9ef4c51cab8
BLAKE2b-256 checksum
How to use checksums
54fd74b9e6bbb8e9f17f3f312abfaaa77223464a5cd43c37b6855d61e3d69668
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / wetlands-2.4.1-py3-none-any.whl

Download URL wetlands-2.4.1-py3-none-any.whl
Size 136.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b1e005c50da15a69c6785a9e454b9e942ea502b98e61a03b6a9299cfc5a25231
BLAKE2b-256 checksum
How to use checksums
1f28751107c4bbd06379a122d6630f42af7605b4abfd358d8a0241adb01d234e
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

2.6.1

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.3

2 release files

2.4.2

2 release files

This release

2.4.1 This release

2 release files

2.4.0

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.1.6

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.11

2 release files

0.4.10

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page