# Python Client The Python client package contains generated MXAccess Gateway protobuf bindings, the `mxgateway` package scaffold, and the `mxgw-py` test CLI scaffold. The package uses the shared proto inputs documented in `../../docs/client-proto-generation.md` so gateway and client contracts stay in sync. ## Layout ```text clients/python/ pyproject.toml generate-proto.ps1 src/mxgateway/ src/mxgateway/generated/ src/mxgateway_cli/ tests/ ``` `src/mxgateway/generated` contains code produced by `grpc_tools.protoc`. Do not edit generated files by hand. ## Regenerating Protobuf Bindings Run generation after the shared `.proto` files or the Python output path changes: ```powershell ./generate-proto.ps1 ``` The script uses the Python tool path recorded in `../../docs/toolchain-links.md`. ## Build And Test Run the Python checks from `clients/python`: ```powershell python -m pip install -e ".[dev]" python -m pytest python -m pip wheel . --no-deps --wheel-dir "$env:TEMP\mxgateway-python-wheel" ``` The scaffold tests import the generated gateway and worker stubs and exercise the deterministic CLI version output. ## CLI The scaffold CLI exposes version information: ```powershell mxgw-py version --json ``` Additional commands are implemented with the async client/session wrapper work.