Provides an abstract base class for interacting with various Git platforms like GitHub and GitLab. Use this to standardize repository, user, and branch data retrieval across different providers.
# Source: https://github.com/poco-ai/poco-claw | License: MIT | Copyright 2026 poco-ai
# Provided via justclaw.it.com; keep this notice with the code.
"""
Base Git client for managing different git platforms.
This module provides an abstract base class for git platform clients,
allowing easy extension to support GitHub, GitLab, and other platforms.
"""
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Any, Self
class GitPlatformError(Exception):
"""Base exception for git platform errors."""
pass
class GitAuthError(GitPlatformError):
"""Exception raised when authentication fails."""
pass
@dataclass
class GitRepository:
"""Represents a git repository."""
id: str | int
name: str
full_name: str
path_with_name
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key