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.11.tar.gz (17.9 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.11-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gitee-openapi-0.2.11.tar.gz
  • Upload date:
  • Size: 17.9 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.11.tar.gz
Algorithm Hash digest
SHA256 d2997529ce6196561e5cf7324ecd28d9ccc6bf3d639b99b70ed2da293c48e4b7
MD5 a5a20f1886f627572a3e711d37f45eb2
BLAKE2b-256 b47de134080637c5a51c507dea5cd2c2ce707c02a6fb2a4fb94fbffa3d953ddc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gitee_openapi-0.2.11-py3-none-any.whl
  • Upload date:
  • Size: 26.8 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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 7f3886e75ead8f2bd2720284e08ad36834cf38815a92d6ff42bb33946db3b922
MD5 ded05456ef396f012db60aaa650943e8
BLAKE2b-256 411a579f83d8026d1c88b860f70f008db83392574cf7fb256e145e177be1ceb5

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