Skip to content

GitFleet

GitFleet is a high-performance Git operations library with Python bindings, powered by Rust. It provides efficient repository management, blame analysis, commit extraction, and integration with Git hosting providers.

🚀 Key Features

  • High-Performance Core: Core operations implemented in Rust for maximum speed
  • Asynchronous API: All repository operations are non-blocking using asyncio
  • Git Provider Integration: Support for GitHub APIs with GitLab and BitBucket coming soon
  • Pydantic Models: Strong validation and serialization for all data
  • Token Management: Automatic token rotation and rate limit handling
  • Pandas Integration: Convert results to DataFrames for analysis

🏗️ Architecture

GitFleet uses a hybrid architecture:

┌────────────────────────┐
│   Python Interface     │   User-friendly API, asyncio integration
├────────────────────────┤
│   PyO3 Bridge Layer    │   Seamless Rust-Python interoperability
├────────────────────────┤
│   Rust Core Library    │   High-performance Git operations
└────────────────────────┘

📋 Main Components

Core Repository Operations

Provider API Clients

🔧 Installation

pip install gitfleet

See the Installation Guide for detailed instructions.

🚦 Quick Start

import asyncio
from GitFleet import RepoManager

async def main():
    # Initialize repository manager
    repo_manager = RepoManager(
        urls=["https://github.com/user/repo"],
        github_username="username",
        github_token="token"
    )

    # Clone repositories
    await repo_manager.clone_all()

    # Get clone tasks
    tasks = await repo_manager.fetch_clone_tasks()

    # Find a cloned repository
    repo_path = next(
        (task.temp_dir for task in tasks.values() 
         if task.status.status_type == "completed"),
        None
    )

    if repo_path:
        # Analyze blame
        blame = await repo_manager.bulk_blame(
            repo_path, ["README.md"]
        )

        # Extract commits
        commits = await repo_manager.extract_commits(repo_path)

    # Clean up
    await repo_manager.cleanup()

if __name__ == "__main__":
    asyncio.run(main())

See the Basic Usage Example for a more complete example.

📚 Documentation

🤝 Contributing

We welcome contributions! See the Contributing Guide for details.

📄 License

GitFleet is released under the MIT License. See the LICENSE file for details.