Skip to main content

A Python git library implemented in Rust using gitoxide

Project description

gitpure

CI PyPI version Python versions

A pure git Python library implemented in Rust using gitoxide. This library provides fast and memory-efficient git operations through Python bindings.

Features

  • Fast: Built with Rust and gitoxide for optimal performance
  • Memory efficient: Leverages Rust's memory management
  • Cross-platform: Works on Linux, macOS, and Windows
  • Pure Python interface: Easy to use Python API
  • Safe: Thread-safe operations with Rust's ownership model

Installation

Install from PyPI:

pip install gitpure

Quick Start

import gitpure

# Clone a repository (with worktree)
repo = gitpure.Repo.clone_from("https://github.com/user/repo.git", "/path/to/local/repo")

# Clone a bare repository
bare_repo = gitpure.Repo.clone_from("https://github.com/user/repo.git", "/path/to/bare/repo", bare=True)

# Get the git directory path
git_dir = repo.git_dir
print(f"Git directory: {git_dir}")

Development

Prerequisites

  • Python 3.8+
  • Rust 1.70+
  • maturin

Building from Source

# Clone the repository
git clone https://github.com/cmeister2/gitpure.git
cd gitpure

# Create a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install maturin
pip install maturin

# Build and install in development mode
maturin develop

# Or build wheel
maturin build --release

Running Tests

# Install test dependencies
pip install pytest

# Run tests
pytest tests/

Release process

Releases are fully automated with semantic-release. The pipeline will:

  1. Inspect the commit history on main using Conventional Commits to determine the next semantic version.
  2. Prepare the Rust crate via semantic-release-cargo, ensuring Cargo.toml and the Python wheel share the same version.
  3. Build wheels and source distributions with maturin and attach them to the GitHub release.
  4. Publish the distribution artifacts to PyPI.

To keep releases working you must:

  • Continue to write commits that follow the Conventional Commits specification (feat:, fix:, etc.).

You can trigger a release by merging changes into main.

Architecture

gitpure is built on top of:

  • gitoxide: A pure Rust implementation of git
  • PyO3: Python bindings for Rust
  • maturin: Build tool for Python extensions written in Rust

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Setup

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for your changes
  5. Ensure all tests pass (pytest)
  6. Commit your changes (git commit -m 'Add some amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gitpure-0.0.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl (4.8 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARM64

gitpure-0.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl (4.8 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARM64

gitpure-0.0.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl (4.8 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARM64

gitpure-0.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl (4.8 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.28+ ARM64

gitpure-0.0.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (4.5 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARMv7l

gitpure-0.0.0-cp313-cp313-manylinux_2_28_aarch64.whl (4.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

gitpure-0.0.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (4.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARMv7l

gitpure-0.0.0-cp312-cp312-manylinux_2_28_aarch64.whl (4.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

gitpure-0.0.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (4.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARMv7l

gitpure-0.0.0-cp311-cp311-manylinux_2_28_aarch64.whl (4.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

gitpure-0.0.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (4.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARMv7l

gitpure-0.0.0-cp310-cp310-manylinux_2_28_aarch64.whl (4.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

gitpure-0.0.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (4.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARMv7l

gitpure-0.0.0-cp39-cp39-manylinux_2_28_aarch64.whl (4.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ ARM64

gitpure-0.0.0-cp38-cp38-manylinux_2_28_aarch64.whl (4.8 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ ARM64

gitpure-0.0.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (4.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARMv7l

File details

Details for the file gitpure-0.0.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5ada98f42c38c9d7f02708b8dcd0fd3b5837cbea4229e1a656ba70eaeff88ae1
MD5 afe614e215db947f298d2a0783c12c95
BLAKE2b-256 9952bcf11101374f8eb7fc7cabb6745ec176ac107008ca3adcbf3b2360525293

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 cd8997e73773fb640d162a3bdf12cfb36ec0d368e56cc6483a9354117f8bf6bd
MD5 2fcc66f78dcaac6d07f34ac218783024
BLAKE2b-256 11f90560a15158d6218d38642cb25919fcd77de6f8276a060b0b3a81fc44e0ff

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2026b98c351fd9826e2c15049241aa88a1125dd1c64d2501619f3a2fe0f1742b
MD5 a97f95a0f6037a21228f3b83f006a248
BLAKE2b-256 1893b7b6228c8cd8069e96c876130e2035ab7880352b2f9c96e1c9b31e8e5a8c

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e7d5e298d722586118e960b4fdd275fe7cb39a19399b9dd99e0087900e004f1e
MD5 8b3cf261ee3fea6d134b710ed9d830c6
BLAKE2b-256 3824fa1477448aaf27efce74680bfb53b4906b9ca57ee2542b5ab8f89dea8c6a

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 f36e079940f183352c729a27bbe1eeeb3f361cf05bd06e1031e4426b157c12ff
MD5 15bc7134e0aa0432572a06a9caf45275
BLAKE2b-256 61a573bd418c5c0260b39e3bcd03d0e17ca3105b7f07a1db9d3a6c5cc18e1e35

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 58c1a5c847dd86be3309dc977481d5ba09930d06ef57f5a8ce5f94a6c3c5a22b
MD5 6e6085abea39e1abc0bde90a704f2b03
BLAKE2b-256 cf7da0f2ca939dc24d72294b88db9f5e607248731b8c27908fb0504e1e1605ec

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 eccf9157af3de9d73bcfcf15024257305cbb6375a23cda2641e99dc9048d925d
MD5 fe54ccd4d3463decd77af156ca76830f
BLAKE2b-256 408dea2c407803de59aeaf19ca58c1b0298c52ba675e878aed7714aefbebc6c4

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0e293dd33738661dd7ed71b8274b1fe5dbbcf80c509428747efe4e6ae9c26474
MD5 224f63f04fede6df871990ca7d00851b
BLAKE2b-256 bc632d3322f63388093a9e2fff35206bd9914968140ea180ffd6cac774f1962e

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 a541782436efa69122ae6366440c4a4a7e4fc5313623a025c3032029f52d8557
MD5 b8de4448a729578d4be82b2e0d35d451
BLAKE2b-256 0fc011a0f5ef688aeaf1075e43f2691659785f8477a4d0bbe38c047b1e107885

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c1fea33ea68700b1b6bad6de335c169d1034ce6ecc0abb9ef94ad5d30c08ee27
MD5 dc7f415efaf6b7b358ab99bd9db88d8a
BLAKE2b-256 148695af4957070e72944a050b15ce7abcd20c77ba90595e6250b10a87c81c41

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 6cbe533a00ced7ba35d5173ea71c771609a31a21a161be775ec0bf667a25ded2
MD5 ce0f2aad13d5ab6dbe65ce5d26085f93
BLAKE2b-256 35e117673e8ae5aab4319bda4b9fbce0a41166effd067402aeb7644324fd2536

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f563950e69250848fa01b276464ffdfab2f5bd3bf828598314b51a4aa0de0c3d
MD5 ed9fcd41e6965b813c1a67f38dc47ff8
BLAKE2b-256 461f263a5a80aa6f4ca4cf1a5877682ca82f1c4c8d36ed5224d00d574471d976

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 aa44ef4bc140d12945ce068227c0805a861c4d1af745c4a4972c76b248f860ed
MD5 961a667664a2b68b543150fe12292158
BLAKE2b-256 508f4a0b80d872f9e94222d9eb8eec033418dda05a2eae117ce256efafd8b18d

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ffd977f2ddf6b3679d5be48dae72f3fc46f390f5a722015a4ba8e565577a8839
MD5 f619152304fe8e2c7b5643e1c93bd1e9
BLAKE2b-256 04c2f6a4c0be395102152aaae0fa07d39e3aef3d9a59448b60237c68ebab9f17

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp38-cp38-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d2879b2767232aa7d105ebb26d693dabb34cf5d93c37aeeb4818ba7eaefc29d8
MD5 7f2944905d10b3b59bedc968a7166c65
BLAKE2b-256 29e5fa2ff3a7b58f268a48261b9ee72c9553ac9b22a9f454d759c24eab8e20ac

See more details on using hashes here.

File details

Details for the file gitpure-0.0.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for gitpure-0.0.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 9a0b4038c13095fc6b9849af29ce22022091d3ac9dc8ec54a41c10d89cdaaef8
MD5 d56a1d29f09b3b24f21b6a59830f862a
BLAKE2b-256 7234a2701f42dfbc1b5349337d28ac8d9f1dbf21ff9b8084a7e063cb11d63721

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page