Python SDK for Gitee API
Project description
Gitee OpenAPI SDK
一个功能完整、结构清晰、易于使用的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
贡献
欢迎贡献代码、报告问题或提出改进建议!
许可证
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.9.tar.gz
(20.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitee-openapi-0.2.9.tar.gz.
File metadata
- Download URL: gitee-openapi-0.2.9.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93ad6cd573c129bf88b3bdd637a7da219acf8bef7d46ee2f78a61fdd3e2af5ae
|
|
| MD5 |
1012eae13f9b2b909677a74abce4014e
|
|
| BLAKE2b-256 |
42f941bc130c0e820b94adcd1d6b7146987425f06e15e058a40b14c6a77b7f08
|
File details
Details for the file gitee_openapi-0.2.9-py3-none-any.whl.
File metadata
- Download URL: gitee_openapi-0.2.9-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb7c49487825d6e12d863f86f60dd95f88dd66566392ab9ad3a58cd2bf8d52c7
|
|
| MD5 |
35853f9ccc407cf12adf8c143ff34f1d
|
|
| BLAKE2b-256 |
1da767937245a9953bb3a3674614bc4ed1d2576625752b57341f465ee4f84d7d
|