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.1.tar.gz (20.1 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.1-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gitee-openapi-0.2.1.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

Hashes for gitee-openapi-0.2.1.tar.gz
Algorithm Hash digest
SHA256 da816c794d4a997ab953cf1144099ef9b70abda91eca2c81fc0a0cafadedcef8
MD5 19d1e0d611613be42e18a585d6806326
BLAKE2b-256 dab579347a6f7df81cc5372660e6636434eb5f2211497a56e0e7c9ea2fa3c850

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gitee_openapi-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 28.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 892f9a56e500b453547c580392ae9e90e40b2a72c36e82d71a8769d531409fba
MD5 d6b5d8918ee2ed6801548768730ba913
BLAKE2b-256 1109ac30d77fd33eccf858561197a3c20815b0f91f0b97132edf1b232a4ed72d

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