Skip to main content

Python SDK for Gitee API

Project description

Gitee OpenAPI SDK

Python Version License

一个功能完整、结构清晰、易于使用的Gitee API Python SDK包,使用uv进行依赖管理。

功能特点

  • 完整覆盖Gitee API的所有功能
  • 模块化设计,结构清晰
  • 简洁易用的接口
  • 完善的错误处理
  • 支持分页处理
  • 类型提示,提高IDE支持
  • 详细的文档和示例

安装

pip install gitee-openapi

使用uv安装:

uv pip install gitee-openapi

快速开始

from gitee import GiteeClient

# 创建客户端
client = GiteeClient(token="your_access_token")

# 获取用户仓库列表
repos = client.repositories.list()
for repo in repos:
    print(f"{repo['full_name']}: {repo['description']}")

# 创建Issue
issue = client.issues.create(
    owner="octocat",
    repo="hello-world",
    title="Found a bug",
    body="I'm having a problem with this."
)
print(f"Created issue #{issue['number']}: {issue['title']}")

支持的API

  • 仓库管理 (Repositories)
  • Issues管理
  • Pull Requests
  • 用户管理 (Users)
  • 组织管理 (Organizations)
  • 代码片段 (Gists)
  • 企业管理 (Enterprises)
  • 邮箱管理 (Emails)
  • 标签管理 (Labels)
  • 里程碑管理 (Milestones)
  • Webhooks
  • 动态通知 (Activities)
  • 门禁检查项 (Checks)
  • 仓库数据 (Git Data)
  • 搜索 (Search)
  • 杂项 (Miscellaneous)

详细文档

查看设计文档了解更多关于SDK架构和设计的信息。

开发

环境设置

# 克隆仓库
git clone https://github.com/bojackli/gitee-sdk.git
cd gitee-sdk

# 使用uv安装依赖
uv pip install -e ".[dev]"

运行测试

pytest

贡献

欢迎贡献代码、报告问题或提出改进建议!

许可证

MIT

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

gitee-openapi-0.2.3.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

gitee_openapi-0.2.3-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file gitee-openapi-0.2.3.tar.gz.

File metadata

  • Download URL: gitee-openapi-0.2.3.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for gitee-openapi-0.2.3.tar.gz
Algorithm Hash digest
SHA256 f27f57864a9b83dbf242e87106509db933f43d7e09f6cc362601507769b3371f
MD5 2854cc3dba478d1c4f617462b78961b8
BLAKE2b-256 dfdb5a57c39a5991d66fcf3cd9dbc3af5789feadb240a9a24d9b0c125084548b

See more details on using hashes here.

File details

Details for the file gitee_openapi-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: gitee_openapi-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for gitee_openapi-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 10c1004eff3f3b0f9a6fd33d34e658358d9d06584abedc25bbefa592e6eca8f7
MD5 b473f268f1613b166a43ce0537573ed7
BLAKE2b-256 6af5b603034684875ebf0a8853947303740c6bf455f5eb1592e42f28c19e887c

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