Skip to main content

gwz-py

gwz-py provides Python bindings to gwz-core and a Python implementation of the GWZ CLI. The CLI keeps the bindings exercised through real user-facing workflows, helping ensure that Python applications can rely on the workspace operations exposed by the message-driven core engine.

The gwz-py CLI is intended to be functional and follows the same command model. For general terminal use, the Rust gwz CLI is the primary and more thoroughly tested implementation. Use gwz-py when Python API integration or a Python-distributed CLI is the requirement.

Both the Python API and CLI call the native gwz-core extension; the package does not shell out to or bundle the Rust gwz executable. The current package uses an in-process bridge, while the typed message boundary is designed to also support a separately hosted core through a remote adapter.

Install

python -m pip install gwz

The distribution installs the gwz-py command and the gwz Python package.

Python API

from pathlib import Path

from gwz import Client


async with Client(root=Path(".")) as client:
    response = await client.status(combined=True)

Long-running operations such as clone, materialize, pull, and push also expose streaming forms for operation progress events.

Python CLI

gwz-py --help
gwz-py status
gwz-py diff

Workspace concepts and workflows are shared with the Rust CLI. Start with the GWZ Quick Start and use the repository lifecycle guide for create, publish, detach, attach, and identity-verification behavior.

Native Bridge And Repository Lifecycle

The asynchronous client sends generated protocol requests through the native extension. For example:

from pathlib import Path

from gwz import Client


async with Client(root=Path("/work/ws")) as client:
    await client.clone_repo_member(
        "git@github.com:org/shared.git",
        "libs/shared",
        member_id="mem_shared",
        source_id="src_shared",
    )
    await client.detach_repo_member("mem_shared")
    await client.attach_repo_member("mem_shared")

Use clone_repo_member_stream(...) when the caller needs clone progress. The native core verifies snapshot and marker commit evidence before reactivating a historical designation; it does not fetch missing history automatically.

Development

Install the development dependencies and run the Python tests:

python -m pip install -e ".[dev]"
python run_tests.py

Build the native extension locally:

python -m maturin develop
python -m pytest src/tests/test_native_bridge.py -q

Check or regenerate the protocol API against the sibling gwz-core checkout:

python scripts/check_protocol_drift.py
python scripts/regen_protocol.py --check

The release smoke test builds and repairs a wheel, installs it in a fresh environment, exercises the installed CLI against a workspace fixture, and checks operation events and materialized state:

python scripts/package_smoke.py

Platform And Status

Status: alpha.

CI validates macOS, Linux, and Windows. Source builds require Rust 1.95 or newer and may need platform OpenSSL, libgit2, and SSH prerequisites when a wheel is not available. Windows source builds can provide those dependencies through vcpkg with VCPKG_ROOT set.

If gwz._gwz_core is missing in a development checkout, run python -m maturin develop from this directory.

License

gwz-py is licensed under GPL-2.0-only.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gwz-0.9.1.tar.gz (143.7 kB view details)

Uploaded Source

Built Distributions

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

gwz-0.9.1-cp310-abi3-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.10+Windows x86-64

gwz-0.9.1-cp310-abi3-manylinux_2_39_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.39+ x86-64

gwz-0.9.1-cp310-abi3-manylinux_2_39_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.39+ ARM64

gwz-0.9.1-cp310-abi3-macosx_11_0_arm64.whl (4.6 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

gwz-0.9.1-cp310-abi3-macosx_10_12_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file gwz-0.9.1.tar.gz.

File metadata

  • Download URL: gwz-0.9.1.tar.gz
  • Upload date:
  • Size: 143.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gwz-0.9.1.tar.gz
Algorithm Hash digest
SHA256 2fdb30af8990458cb16ffde19eeb8f9777e869de0b9ad1c92f473a8e0df6757a
MD5 2540cebc9078cc79e8e86f15366918d8
BLAKE2b-256 742cf406710c42f3b64e45adc6c7dc47bb5285de01988f645fa7a5560c7df0a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for gwz-0.9.1.tar.gz:

Publisher: publish.yml on owebeeone/gwz-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gwz-0.9.1-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: gwz-0.9.1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gwz-0.9.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e33128bd31ae38772c005928e8445afcc83bad15af0ba3314f92327fdadd1a6b
MD5 7adb156a9c399a1e60039236df45b018
BLAKE2b-256 d92b87cca61fa56233e5a8a520e7d3a5968eee7130989bcfc9ec30c099bbe384

See more details on using hashes here.

Provenance

The following attestation bundles were made for gwz-0.9.1-cp310-abi3-win_amd64.whl:

Publisher: publish.yml on owebeeone/gwz-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gwz-0.9.1-cp310-abi3-manylinux_2_39_x86_64.whl.

File metadata

  • Download URL: gwz-0.9.1-cp310-abi3-manylinux_2_39_x86_64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.10+, manylinux: glibc 2.39+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gwz-0.9.1-cp310-abi3-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 4fa0a633fb345e7f8ea0255eb63fc05794359bed6e16dbd4d1e45df9a80a9b76
MD5 618ed56ffdb4c04b80b0079ab08916cf
BLAKE2b-256 6d936fe4e911329e905f5894d0639eeff6413ae814f37d6f790a25e1eef9c3e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for gwz-0.9.1-cp310-abi3-manylinux_2_39_x86_64.whl:

Publisher: publish.yml on owebeeone/gwz-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gwz-0.9.1-cp310-abi3-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for gwz-0.9.1-cp310-abi3-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 0b7f5cf1699158636b5426ef7357345cb4c1a43039236c898172f9e0a4270b9a
MD5 655ecb4a50269bcf6680247a92e59f03
BLAKE2b-256 a6bc22366840fa87e8fce69c27980f4fa4ce79c0d8ae7e12823595456e7d64b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gwz-0.9.1-cp310-abi3-manylinux_2_39_aarch64.whl:

Publisher: publish.yml on owebeeone/gwz-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gwz-0.9.1-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: gwz-0.9.1-cp310-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.10+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gwz-0.9.1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b33c745917180011f05593e787a9a35fcd62e8c598b2026376a140ae40b8d07
MD5 284602b7188f14523c6e3f87b223adf2
BLAKE2b-256 2fda67fdc60a9539fd0e0f35cce129bf59f044de1cca9b1ae7d9fcd36165a831

See more details on using hashes here.

Provenance

The following attestation bundles were made for gwz-0.9.1-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: publish.yml on owebeeone/gwz-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gwz-0.9.1-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: gwz-0.9.1-cp310-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.10+, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gwz-0.9.1-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7618f25d87a2ff216e6190784fc3e78fb27a59b76d68538f4d115a2728ed0ab5
MD5 83287920f87ab7e8f7b55c2ed3055836
BLAKE2b-256 213e7924f6388147f63bd45edd9aa338e17a928cc2dcf69c8e17e72311d1d2cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for gwz-0.9.1-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: publish.yml on owebeeone/gwz-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.10.5

6 files

0.10.3

6 files

0.10.2

6 files

0.9.2

6 files

This release

0.9.1 This release

6 files

0.9.0

6 files

0.8.2

6 files

0.8.1

6 files

0.7.5

6 files

0.7.4

6 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