Skip to main content

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 issue
  • GET /api/v1/repos/{owner}/{repo}/issues/{index} — get issue
  • GET /api/v1/repos/{owner}/{repo}/issues — list issues
  • POST /api/v1/repos/{owner}/{repo}/issues/{index}/comments — comment (works for PRs too)

Pull Requests

  • POST /api/v1/repos/{owner}/{repo}/pulls — create PR
  • GET /api/v1/repos/{owner}/{repo}/pulls — list PRs
  • GET /api/v1/repos/{owner}/{repo}/pulls/{index} — get PR details
  • POST /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 repo
  • GET /api/v1/user/repos — list user's repos
  • GET /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.

Metadata

Release files for ldraney-forgejo-sdk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ldraney-forgejo-sdk 0.1.0
File Size Uploaded
ldraney_forgejo_sdk-0.1.0.tar.gz 165.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ldraney-forgejo-sdk 0.1.0
File Interpreter ABI Platform
ldraney_forgejo_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 193.3 kB

Release files / ldraney_forgejo_sdk-0.1.0.tar.gz

Download URL ldraney_forgejo_sdk-0.1.0.tar.gz
Size 165.6 kB
Tags Source
SHA-256 checksum
How to use checksums
99119814e5834f9db58f3f2fa2faad001884ab9ba2366c73c5abc67a9032ad39
BLAKE2b-256 checksum
How to use checksums
a1f40ef7482b4ebaf092307784ff190d89265ef4fa3ab330bf976a1abda7c062
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / ldraney_forgejo_sdk-0.1.0-py3-none-any.whl

Download URL ldraney_forgejo_sdk-0.1.0-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
577f553238be280be668bfd33a9e633485ec1a5f819075a6ef8dd11aa8147ea2
BLAKE2b-256 checksum
How to use checksums
af1d8fc9a10d90e7ce2afc233949049d928f388149a1373a1cdb0f5e1fd0a245
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page