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

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 0.14.0

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 0.14.0
File Size Uploaded
gwz-0.14.0.tar.gz 225.5 kB Details

Built distributions (wheels)

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

Total release size: 34.1 MB

Release files / gwz-0.14.0.tar.gz

Download URL gwz-0.14.0.tar.gz
Size 225.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f41a6c714ca4cb7ffa62c3da8cf72f4e0a79d439ddfa02c8a3f10a7b838bfd4b
BLAKE2b-256 checksum
How to use checksums
845e727b16f1189856a21bd359cd8c3adf062d21e8eb4b41c68e17ebc7efb04a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 5, 2026.

Transparency log

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

Download URL gwz-0.14.0-cp310-abi3-win_amd64.whl
Size 4.7 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
715b235063d642d3b9d608241e97c3cf807fb71429de4487bfa91099d4c3e41d
BLAKE2b-256 checksum
How to use checksums
9ccadf6c062cbdae35d24a1b219dae357365d342061a989ffd292a93d9162a3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 5, 2026.

Transparency log

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

Download URL gwz-0.14.0-cp310-abi3-manylinux_2_39_x86_64.whl
Size 7.4 MB
Tags CPython 3.10 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
09e753ed9b3ba68b1c185cbc216c629d9dfe67fd79a42fc647a505d39e231384
BLAKE2b-256 checksum
How to use checksums
b70effe5a7232e6b3f9dc363ae9d08af9cf41262e304b7e62bf2a85331096818
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 5, 2026.

Transparency log

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

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

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 Sep 5, 2026.

Transparency log

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

Download URL gwz-0.14.0-cp310-abi3-macosx_11_0_arm64.whl
Size 7.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
08e36dacb2ef08a1cd3f99f5d3364cc7ef27c5ed6b6ab409ed867ae45a4b1251
BLAKE2b-256 checksum
How to use checksums
30e691a36e672c4de6d5da6d440919b743c61e2f8114ac416dbe410d7b61b362
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 5, 2026.

Transparency log

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

Download URL gwz-0.14.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 7.3 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
adb396d7fb328e70e27e00b29cbb397a1ab5fd2e22917057d565cb8cead12ddd
BLAKE2b-256 checksum
How to use checksums
cff17a9ba33b40d8dae69de15b1cbf4d173298a56066488c24c70eeb5e431975
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 5, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.17

6 release files

1.0.16

6 release files

1.0.14

6 release files

1.0.13

6 release files

1.0.12

6 release files

1.0.11

6 release files

1.0.8

6 release files

1.0.3

6 release files

This release

0.14.0 This release

6 release files

0.12.0

6 release files

0.11.1

6 release files

0.11.0

6 release files

0.10.5

6 release files

0.10.2

6 release files

0.9.2

6 release files

0.9.1

6 release files

0.9.0

6 release files

0.8.2

6 release files

0.8.1

6 release files

0.7.5

6 release files

0.7.4

6 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