Skip to main content

gitoxide-py

Fast, typed Python access to local Git repositories.

Build status Python 3.9 or later

Explore repositories, inspect history and working-tree state, and manage refs from Python without blocking other threads.

Quick start

Build from a checkout of this repository:

uv sync
uv run maturin develop --release --generate-stubs
import gitoxide_py as gix

repo = gix.discover(".")

print(repo.git_dir)
print(repo.head_name)
print(repo.head_commit().summary)

for commit in repo.commits(max_count=10):
    print(commit.short_id, commit.author.name, commit.summary)

print(repo.branches())
print(repo.tags())
print(repo.read_blob("HEAD:README.md").decode())

The generated API snapshot used by the Griffe CI check lives in stubs/gitoxide_py/__init__.pyi. Regenerate it after changing the PyO3 API by building a wheel with uv run maturin build --generate-stubs, then replace the tracked stub with the wheel's gitoxide_py/__init__.pyi.

What it covers

  • Repository and history: HEAD and branch state, revisions, commit walks, merge bases, ahead/behind counts, ancestry, references, branches, tags, and reflogs.
  • Content inspection: object kinds, tree entries, blob reads, tree-to-tree diffs with line hunks, and blame.
  • Working repository state: remotes, linked worktrees, submodules, local configuration, index entries and conflicts, and working-tree status.
  • Focused changes: create or delete branches and tags, and update local configuration. These operations do not modify the working tree.
  • Python-friendly: every Git operation releases the GIL, and generated type information is available to mypy and pyright.

Network operations (clone, fetch, and push) and changes to commits, index entries, or working-tree files are not part of the API.

Development

uv run pytest -v
uv run maturin build --generate-stubs

Metadata

Release files for gitoxide-py 0.87.1

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

Source distribution (sdist)

Source distribution for gitoxide-py 0.87.1
File Size Uploaded Provenance Actions
gitoxide_py-0.87.1.tar.gz 79.9 kB Without provenance Details for gitoxide_py-0.87.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for gitoxide-py 0.87.1
File Interpreter ABI Platform Actions
gitoxide_py-0.87.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for gitoxide_py-0.87.1-cp39-abi3-win_amd64.whl
gitoxide_py-0.87.1-cp39-abi3-manylinux_2_39_x86_64.whl CPython 3.9 abi3 Linux glibc 2.39+ x86-64 Details for gitoxide_py-0.87.1-cp39-abi3-manylinux_2_39_x86_64.whl

Total release size: 6.1 MB

Release files / gitoxide_py-0.87.1.tar.gz

Download URL gitoxide_py-0.87.1.tar.gz
Size 79.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c19350a8b53bdf949edc86fc690de96285a04fa7f563b3020451f6d2cb25f046
BLAKE2b-256 checksum
How to use checksums
fc632711ca34c50c95695a081ac7e95ca27a1f32371e79f188e9b9c94760ab21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / gitoxide_py-0.87.1-cp39-abi3-win_amd64.whl

Download URL gitoxide_py-0.87.1-cp39-abi3-win_amd64.whl
Size 3.1 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
9fa2ef1f497ee14d5f479e68e33ba59e883d5761cf758227715bd8ad488f79dd
BLAKE2b-256 checksum
How to use checksums
a1a5c9ea3bd5dc8c4229d9dca211715ba672a703e9e174d79386533dbd1fe128
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / gitoxide_py-0.87.1-cp39-abi3-manylinux_2_39_x86_64.whl

Download URL gitoxide_py-0.87.1-cp39-abi3-manylinux_2_39_x86_64.whl
Size 3.0 MB
Tags CPython 3.9 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
d85522d5791f876b2529f2b8b6892d6cbfe7e9ad2a0fcf83f79a66506dd82cf0
BLAKE2b-256 checksum
How to use checksums
405d7e96f1af2e236bc0ae1303c6331b28a04a0988e90c4b39c211c08288f73f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.6

Security for gitoxide-py 0.87.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.87.1 This release

3 release files No provenance

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