ldraney-forgejo-sdk (0.1.0)
Published 2026-03-01 17:48:33 +00:00 by forgejo_admin
Installation
pip install --index-url ldraney-forgejo-sdkAbout this package
Python SDK wrapping the Forgejo REST API via httpx (304 endpoints)
forgejo-sdk
Python SDK wrapping the Forgejo REST API via httpx.
API Reference
swagger.v1.json is the full OpenAPI spec from the live Forgejo instance (v14.0.2, 304 endpoints). Use it as the source of truth for endpoint paths, parameters, and response shapes.
Priority Endpoints
The SDK should cover these first (what agents actually use):
Issues
POST /api/v1/repos/{owner}/{repo}/issues— create issueGET /api/v1/repos/{owner}/{repo}/issues/{index}— get issueGET /api/v1/repos/{owner}/{repo}/issues— list issuesPOST /api/v1/repos/{owner}/{repo}/issues/{index}/comments— comment (works for PRs too)
Pull Requests
POST /api/v1/repos/{owner}/{repo}/pulls— create PRGET /api/v1/repos/{owner}/{repo}/pulls— list PRsGET /api/v1/repos/{owner}/{repo}/pulls/{index}— get PR detailsPOST /api/v1/repos/{owner}/{repo}/pulls/{index}/merge— merge PR (body:{"Do":"squash"})GET /api/v1/repos/{owner}/{repo}/pulls/{index}.diff— get PR diff (also available at web URL without auth)
Repos
GET /api/v1/repos/{owner}/{repo}— get repoGET /api/v1/user/repos— list user's reposGET /api/v1/repos/{owner}/{repo}/branches— list branches
Auth
HTTP Basic Auth: ForgejoClient(base_url, username, password).
Pattern
Same as ldraney/notion-sdk — pure httpx wrapper, no MCP dependency. The MCP layer (ldraney/forgejo-mcp) wraps this SDK.
Requirements
Requires Python: >=3.10