🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

gitfleet

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitfleet

GitFleet is a high-performance Python library (powered by Rust) for managing and analyzing Git repositories in bulk. It supports asynchronous cloning, parallel git blame and commit analysis using Rayon, and integrates with GitHub, GitLab, and BitBucket APIs. Designed for large-scale repository analysis, GitFleet handles API token rotation, monitors rate limits, and provides detailed progress tracking across operations.

0.2.8
Maintainers
1

🚀 GitFleet

High-performance Git repository analysis and management in Python, powered by Rust

PyPI version License Build Status Documentation

⚡ Overview

GitFleet is a high-performance Python library built in Rust for asynchronous Git repository analysis at scale. It combines the speed and memory efficiency of Rust with the ease of use of Python's async/await syntax.

It supports bulk operations like:

  • Parallel git blame across many files (10-50x faster than pure Python)
  • Async cloning of hundreds of repositories with progress monitoring
  • GitHub, GitLab, and GitBucket integration with native API clients
  • API token rotation and rate limit monitoring to prevent 429 errors
  • Real-time progress tracking for long-running tasks

Ideal for:

  • Grading systems (e.g., student GitHub repos)
  • Research in software engineering and code evolution
  • DevOps and CI insights at scale
  • Custom git analytics platforms
  • Any application requiring efficient handling of multiple Git repositories

🔧 Features

  • Rayon-powered multithreaded Git operations
  • Asynchronous repo cloning with async/await
  • Integrated clients for GitHub, GitLab, GitBucket
  • Multiple token management with auto-rotation
  • Rate limit tracking and resilience
  • Modular architecture: easily extendable

📚 Documentation

Visit our comprehensive documentation for:

  • Detailed API reference
  • Usage examples
  • Provider integrations
  • Advanced configuration

📦 Installation

pip install gitfleet

Requires Python 3.8+ and a Rust toolchain for building native extensions. Pre-built wheels are available for most common platforms.

🚀 Quick Start

import asyncio
from gitfleet import RepoManager

async def main():
    manager = RepoManager()
    await manager.clone_repos([
        "https://github.com/user/repo1.git",
        "https://github.com/user/repo2.git"
    ])
    results = await manager.blame_all("target_file.py")
    print(results)

asyncio.run(main())

🔌 Integration

GitFleet is designed to interoperate with:

  • GitHub, GitLab, GitBucket via async clients
  • Jupyter notebooks (Pandas-friendly outputs)
  • Flask, FastAPI, and async dashboards (e.g., Plotly Dash)
  • CI/CD pipelines or grading systems

🛠 Architecture

LayerTechnologyPurpose
Rust Coregit2, rayonFast Git ops and parallelism
Python InterfacePyO3, maturinNative bindings and async APIs
Async Clientshttpx, aiohttpGitHub/GitLab API access
Token ManagerCustomMulti-token rotation & rate monitoring

📈 Roadmap

  • Git diff and patch inspection
  • Repository graph & commit visualizations
  • CSV/JSON export for data analysis
  • Web dashboard example with live metrics

🤝 Contributing

We welcome contributions! To get started:

git clone https://github.com/bmeddeb/gitfleet
cd gitfleet
pip install -e ".[dev]"

Run tests with:

pytest

For more details on contributing, see our development documentation.

📄 License

MIT License

✨ Credits

GitFleet is inspired by the needs of large-scale Git analysis in grading, research, and dev tooling. Built with ❤️ using Rust + Python.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts