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.10.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.10-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gitee-openapi-0.2.10.tar.gz
Algorithm Hash digest
SHA256 ac4b3de2e7c9f925f8ad01603b6e7ff126e16bbc0e5575e9a4683547dc33d9a1
MD5 ccf2efabd845ba96fa069ef9c3d8cc3d
BLAKE2b-256 1bb73134224ef7b9445a10a30084a3dec1f5c02ce7e952a0245aec28a240102e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gitee_openapi-0.2.10-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.0

File hashes

Hashes for gitee_openapi-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 b9ac34daf872aa9057990dae081e77c71b58d6d18fd7cf26e8c3f0e12cd47c8d
MD5 a3c2f285fbca654e764ab627b0736311
BLAKE2b-256 a345b3c787911ca988b6048b14064ec434360076c5be40ef5aef95035f22ade7

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