GixPython
Python bindings to Gitoxide's gix::Repository, written in Rust with PyO3.
The distribution is GixPython. Import it as gix. This is an alpha project; its API may change before 1.0. The first release targets macOS 11+ on Apple Silicon and Intel, with CPython 3.11+ and separate wheels for free-threaded CPython 3.14. Linux and Windows are not supported release platforms yet.
import itertools
import gix
repo = gix.discover(".")
commit = repo.find_commit("HEAD")
print(commit.id, commit.message_raw())
with repo.rev_walk(["HEAD"]).first_parent_only().all() as history:
for entry in itertools.islice(history, 10):
print(entry.id, entry.object().message_raw())
with repo.status().into_iter([]) as changes:
for change in changes:
print(change.location, change.summary())
Native object-ID arguments accept ObjectId, object wrappers, or str/bytes revision specifications. This preserves native object kinds: an annotated tag is not implicitly peeled into a commit. Use a revision such as v1.0^{commit} or explicitly peel the returned object. Lazy operations resolve revisions when first consumed. Compare-and-swap reference constraints always retain literal captured targets.
Git contents, paths inside trees, reference names, and messages remain bytes. Filesystem paths are pathlib.Path objects. Decode bytes explicitly when displaying text. Methods retain native names and meaning: Repository.commit() creates a commit, and find_commit() looks one up.
Capabilities
Bindings cover repositories, objects and tree editing, references and reflogs, configuration transactions, history, index editing, status, diffs, attributes, excludes, pathspecs, filters, directory walking, submodules, notes, blame, blob/tree/commit merges, worktrees, archives, remotes, clone, and fetch. See the native API coverage record for individual operations, feature gates, and limitations.
The bindings use native Gitoxide operations. The Git executable is used by tests, and is not an implementation fallback. Configured SSH, credential, filter, signing, and merge programs may still run through the native engine.
Parallelism and lifetimes
Repository handles are safe to share between Python threads. Normal operations use independent native handles and detach from Python while working. Gitoxide parallelism is always enabled. The extension supports GIL-disabled CPython; mutable native builders reject overlapping use rather than depending on the GIL.
Native iterators and output streams remain lazy. Use their context managers or close() to release a partially consumed operation promptly. Progress is pollable with Progress.snapshot(), and another thread can cancel through CancellationToken. Normal Python signals raise KeyboardInterrupt. Cancellation is cooperative; some native computations and blocked transport I/O must finish before cleanup can complete. See runtime semantics.
Installation
Install the latest published version with:
python -m pip install --only-binary=:all: GixPython
Wheels include the native Rust extension; installation needs no Rust or C compiler. Source builds require Rust 1.89+, a linker, and network access to Rust dependencies.
Build locally
Use CPython 3.11 or newer, Rust 1.89 or newer, and a system linker:
python3 etc/build.py
PYTHONPATH=python python3 -m unittest discover -s tests
Default max-pure builds include both SHA-1 and SHA-256 and broad repository capabilities. Hashing, compression, and HTTPS use Rust implementations; building the dependencies does not require a C or C++ compiler. HTTPS uses reqwest/rustls with Graviola, whose supported CPU targets are checked at runtime.
Select a smaller source build explicitly:
python3 etc/build.py --no-default-features --features sha256,revision,index
gix.build_features() reports the installation's capabilities, and gix.HashKind.all() reports its supported hash kinds. Feature-gated Python methods and types are absent when disabled. The included type stubs describe the full build.
Ordinary wheel builds select the abi3 Cargo feature for CPython 3.11+. Free-threaded builds require CPython 3.14+ and a wheel built for that interpreter. Development instructions describe artifacts, validation, and upstream integration. GitHub workflows test supported configurations and build macOS release artifacts. See RELEASING.md for the manual publishing procedure.
More examples
- Objects, references, and history
- Pollable progress and cancellation
- Native blob merges
- Worktrees, streams, and archives
- Submodules
- Clone, fetch, and TLS
See CONTRIBUTING.md and SECURITY.md for contributions and vulnerability reporting.
License
Copyright (c) 2026 Sebastian Thiel. Licensed under either Apache License, Version 2.0 or the MIT license, at your option, matching Gitoxide.
Metadata
Release files for GixPython 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| gixpython-0.3.0.tar.gz | 210.1 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| gixpython-0.3.0-cp314-cp314t-macosx_11_0_x86_64.whl | CPython 3.14 | CPython 3.14 free-threading | macOS 11.0+ x86-64 | Details |
| gixpython-0.3.0-cp314-cp314t-macosx_11_0_arm64.whl | CPython 3.14 | CPython 3.14 free-threading | macOS 11.0+ ARM64 | Details |
| gixpython-0.3.0-cp311-abi3-macosx_11_0_x86_64.whl | CPython 3.11 | abi3 | macOS 11.0+ x86-64 | Details |
| gixpython-0.3.0-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 37.5 MB
Release files / gixpython-0.3.0.tar.gz
| Download URL | gixpython-0.3.0.tar.gz |
|---|---|
| Size | 210.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3deec47485fec6221850ced1bcb7608c0b14ef47391d42716718deee5031c9f3
|
|
BLAKE2b-256 checksum How to use checksums |
08a9121c9d1b8ae033cb5cb63d87e80c43fba662590c10df437ae635452394a4
|
| 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 Oct 24, 2026.
Transparency logRelease files / gixpython-0.3.0-cp314-cp314t-macosx_11_0_x86_64.whl
| Download URL | gixpython-0.3.0-cp314-cp314t-macosx_11_0_x86_64.whl |
|---|---|
| Size | 9.6 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
262c406adf9dc2e69e33939ac7d686e330119a6bb596fccaeae4d61b8919498e
|
|
BLAKE2b-256 checksum How to use checksums |
494f277f269f966fa59851bad2ad8ee6564fb0d5ac2d65eea4b7d80d5959e75b
|
| 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 Oct 24, 2026.
Transparency logRelease files / gixpython-0.3.0-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | gixpython-0.3.0-cp314-cp314t-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.0 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
801a6c644ae823d890de0bfcaa2b5442e0bb9899aaf93bdc179cbfaacedd8d15
|
|
BLAKE2b-256 checksum How to use checksums |
6cb1ac8f35193fa0c8875b170b4a66d295ffc28afb37270c9b4db5158e9287fc
|
| 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 Oct 24, 2026.
Transparency logRelease files / gixpython-0.3.0-cp311-abi3-macosx_11_0_x86_64.whl
| Download URL | gixpython-0.3.0-cp311-abi3-macosx_11_0_x86_64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
76ac5c76f4a3fb775832f61712b46a62ce417be49b20ff356655275b0a2dfa07
|
|
BLAKE2b-256 checksum How to use checksums |
c2df2593094b19fa6fb41118bc3fa5cecce9408c0e698d06913d540f6c8768e2
|
| 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 Oct 24, 2026.
Transparency logRelease files / gixpython-0.3.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | gixpython-0.3.0-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.1 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f86f6da51cb07eb4b7d14a997d4e9f874e334bbaa333cef8762773f9f39c230e
|
|
BLAKE2b-256 checksum How to use checksums |
67ece336640d98867da453ef7499a2ffeff2448cb5470f0cd130c057996d17be
|
| 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 Oct 24, 2026.
Transparency logSecurity for GixPython 0.3.0
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 5 files in this release have been uploaded with provenance metadata.
Attestation for gixpython-0.3.0.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 24, 2026.
Transparency logA 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.