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

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

wetlands-2.4.0.tar.gz (330.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wetlands-2.4.0-py3-none-any.whl (134.6 kB view details)

Uploaded Python 3

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

Hashes for wetlands-2.4.0.tar.gz
Algorithm Hash digest
SHA256 e2e076c61d59f0cf68e75735749453aca80851d575cc7ca12947cadb7cfc48b0
MD5 e197339f2341c7fea53c5e9445e10661
BLAKE2b-256 89841af181390d1a6bfa7c0ffa3b5e8de0d4803a910748c98a78ad697ffa6fa5

See more details on using hashes here.

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

Hashes for wetlands-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a6377c62750338c7675183e627bafca001f025b62beb046b09398864e3ca1fb
MD5 869b4520cafa1a254689e0ef9be77712
BLAKE2b-256 df7755ab35cb2cbfb230a7c2d1102203307fd2a75133e46a7fd79e06ce305744

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.4.0 This release

2 files

2.3.3

2 files

2.3.2

2 files

2.3.1

2 files

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.0

2 files

1.1.6

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.9

2 files

1.0.8

2 files

1.0.7

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.1

2 files

1.0.0

2 files

0.4.11

2 files

0.4.10

2 files

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.0

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page