Skip to main content

gwz-py

gwz-py provides Python bindings to gwz-core and a Python implementation of the GWZ (Git Workspace Zone) 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
gwz-py log

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.

Unified commit log

gwz-py log renders the same core commit-log records as the Rust CLI. Its compact default shows the recorded date, workspace-relative member set, short hash, and subject. Use gwz-py log --full --body for git-style blocks with the complete member table and commit body. Human degradations are written to stderr; output is never paged, and --color=auto colors only a terminal.

--json emits one {"schema": "gwz.log/v0", "records": [...]} document. --jsonl begins with the schema header and then emits one entry or degradation record per line. Both machine forms are byte-compatible with Rust gwz for the same protocol records, including the explicit lossy flag for source bytes converted to U+FFFD.

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

Cross-driver tests need a gwz CLI. GWZ_RUST_BIN names one explicitly and is always honoured; otherwise the runner builds the sibling gwz-cli checkout and picks the binary up from where cargo actually put it. A gwz-cli that is a member of the cargo workspace above it (its parent Cargo.toml lists it under [workspace] members) is built into the workspace target/, so that one is preferred and any leftover gwz-cli/target/debug/gwz is ignored; a standalone gwz-cli checkout uses its own target/. The runner prints the binary it chose and the reason.

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.

Metadata

Release files for gwz 1.0.18

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

Source distribution (sdist)

Source distribution for gwz 1.0.18
File Size Uploaded Provenance Actions
gwz-1.0.18.tar.gz 296.3 kB With provenance Details for gwz-1.0.18.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for gwz 1.0.18
File Actions
gwz-1.0.18-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for gwz-1.0.18-cp310-abi3-win_amd64.whl
gwz-1.0.18-cp310-abi3-manylinux_2_39_x86_64.whl CPython 3.10 abi3 Linux glibc 2.39+ x86-64 Details for gwz-1.0.18-cp310-abi3-manylinux_2_39_x86_64.whl
gwz-1.0.18-cp310-abi3-manylinux_2_39_aarch64.whl CPython 3.10 abi3 Linux glibc 2.39+ ARM64 Details for gwz-1.0.18-cp310-abi3-manylinux_2_39_aarch64.whl
gwz-1.0.18-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for gwz-1.0.18-cp310-abi3-macosx_11_0_arm64.whl
gwz-1.0.18-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for gwz-1.0.18-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 38.9 MB

Release files / gwz-1.0.18.tar.gz

Download URL gwz-1.0.18.tar.gz
Size 296.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f3bf5137496d2e0385ad540d4031126faddc84211d7a35d4ad299bd0fa3919ee
BLAKE2b-256 checksum
How to use checksums
ee8dcb40c81137585afb68dd43ada920783a4d3f83073cc57d1c845b173a01ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / gwz-1.0.18-cp310-abi3-win_amd64.whl

Download URL gwz-1.0.18-cp310-abi3-win_amd64.whl
Size 5.6 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e13fcef99b36426182bc9eb93a09bde42ca8eaaf4dc75ed40d5f7b0237b196b4
BLAKE2b-256 checksum
How to use checksums
7dcf4022aad600f513075da322baa7ed3f4337a47149c57161f05449d3baa140
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / gwz-1.0.18-cp310-abi3-manylinux_2_39_x86_64.whl

Download URL gwz-1.0.18-cp310-abi3-manylinux_2_39_x86_64.whl
Size 8.4 MB
Tags CPython 3.10 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
b3ad9034d2f1ec75a605347d3a7c1ed58387f92cdb7f5c2a3c9adca7a4fe3a05
BLAKE2b-256 checksum
How to use checksums
1bf204ec55bca2e6a2c6068abd7ff2ddf26dfc0aa8eeca337774154c120480e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / gwz-1.0.18-cp310-abi3-manylinux_2_39_aarch64.whl

Download URL gwz-1.0.18-cp310-abi3-manylinux_2_39_aarch64.whl
Size 8.2 MB
Tags CPython 3.10 Linux glibc 2.39+ ARM64 abi3
SHA-256 checksum
How to use checksums
e4ecee56a2c17e28cfc4d84ebd388d242037d23d29b10937982f1680f53d1b86
BLAKE2b-256 checksum
How to use checksums
e4592789a530708a8318fba6855a79c427e7a83e77ecfd50006528392e99a177
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / gwz-1.0.18-cp310-abi3-macosx_11_0_arm64.whl

Download URL gwz-1.0.18-cp310-abi3-macosx_11_0_arm64.whl
Size 8.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ad17b8fb7be717409ab45af2aec3db3ac8c621298a1ea8886f65777b9a019372
BLAKE2b-256 checksum
How to use checksums
e2a789d5772baa932308b22030cf33950ef0f60dcf314a263a54d0df95a69855
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / gwz-1.0.18-cp310-abi3-macosx_10_12_x86_64.whl

Download URL gwz-1.0.18-cp310-abi3-macosx_10_12_x86_64.whl
Size 8.3 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0daf3a436fa7cf48dd926debeefd2c142f5112aac7c8d0179b98623b06fcf031
BLAKE2b-256 checksum
How to use checksums
cc2b7885c4ca1ecca46fe2cc8c373f6716eb1ad71baa13ff14faf6925b7d5a12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for gwz 1.0.18

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for gwz-1.0.18.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

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.

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