Skip to main content

Python SDK wrapping the Forgejo REST API via httpx (304 endpoints)

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ldraney_forgejo_sdk-0.1.0.tar.gz (165.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ldraney_forgejo_sdk-0.1.0-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file ldraney_forgejo_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: ldraney_forgejo_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 165.6 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for ldraney_forgejo_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 99119814e5834f9db58f3f2fa2faad001884ab9ba2366c73c5abc67a9032ad39
MD5 961370b2bf39bb321eb6ca93287924ed
BLAKE2b-256 a1f40ef7482b4ebaf092307784ff190d89265ef4fa3ab330bf976a1abda7c062

See more details on using hashes here.

File details

Details for the file ldraney_forgejo_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ldraney_forgejo_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for ldraney_forgejo_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 577f553238be280be668bfd33a9e633485ec1a5f819075a6ef8dd11aa8147ea2
MD5 6dc811ec24146772995c2058c85c3a2b
BLAKE2b-256 af1d8fc9a10d90e7ce2afc233949049d928f388149a1373a1cdb0f5e1fd0a245

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page