Gitee OpenAPI SDK
一个面向常用 Gitee 开发协作流程、结构清晰、易于使用的 Python SDK 包,使用 uv 进行依赖管理。
功能特点
- 覆盖仓库、Issue、Pull Request、Release 等核心开发协作 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)
- README、目录内容、文件新建/更新/删除、提交对比、blame、多文件提交
- 分支创建、分支保护、协作者权限查询
- Release CRUD 与附件列表/获取/删除/下载
- Issues管理
- Pull Requests
- 合并状态、审查/测试、审查者/测试者指派、关联 issues、标签、评论管理
- 用户管理 (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
贡献
欢迎贡献代码、报告问题或提出改进建议!
许可证
Metadata
Release files for gitee-openapi 0.2.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gitee_openapi-0.2.16.tar.gz | 21.8 kB | Without provenance | Details for gitee_openapi-0.2.16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gitee_openapi-0.2.16-py3-none-any.whl | Python 3 | none | any | Details for gitee_openapi-0.2.16-py3-none-any.whl |
Total release size: 54.5 kB
Release files / gitee_openapi-0.2.16.tar.gz
| Download URL | gitee_openapi-0.2.16.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f470287ae01aca026fa1cb7bd75638805eef13a5e5b6c98dcca73b8052904d5d
|
|
BLAKE2b-256 checksum How to use checksums |
2139dee156d4eb151ad0f6b8ba2ca71ecafbaeab49bb2e68fdaa5586dc379e57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.18
|
Release files / gitee_openapi-0.2.16-py3-none-any.whl
| Download URL | gitee_openapi-0.2.16-py3-none-any.whl |
|---|---|
| Size | 32.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
531c84528585c9e1029f5e57755f883580956d774fb8f833e518340cf0dfe9f2
|
|
BLAKE2b-256 checksum How to use checksums |
1cc323ecf734f4840a8b0f2f433f960650a6a09763b8b7da3d4dd8242ac86bd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.18
|
Security for gitee-openapi 0.2.16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.