gitcode-api 1.3.0__tar.gz → 1.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/PKG-INFO +15 -18
  2. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/README.md +12 -15
  3. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/llm/mcp.py +1 -1
  4. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/collaboration/issues_resource_group.py +12 -1
  5. gitcode_api-1.3.1/gitcode_api/version.txt +1 -0
  6. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api.egg-info/PKG-INFO +15 -18
  7. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/pyproject.toml +20 -18
  8. gitcode_api-1.3.0/gitcode_api/version.txt +0 -1
  9. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/LICENSE +0 -0
  10. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/__init__.py +0 -0
  11. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/__main__.py +0 -0
  12. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/_base_client.py +0 -0
  13. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/_base_resource.py +0 -0
  14. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/_cli_banner.py +0 -0
  15. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/_client.py +0 -0
  16. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/_exceptions.py +0 -0
  17. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/_models.py +0 -0
  18. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/cli.py +0 -0
  19. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/constants.py +0 -0
  20. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/exceptions.py +0 -0
  21. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/llm/__init__.py +0 -0
  22. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/llm/_tool.py +0 -0
  23. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/llm/jiuwen.py +0 -0
  24. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/llm/openai.py +0 -0
  25. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/models.py +0 -0
  26. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/py.typed +0 -0
  27. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/__init__.py +0 -0
  28. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/_shared/__init__.py +0 -0
  29. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/_shared/base.py +0 -0
  30. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/_shared/fetch_template.py +0 -0
  31. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/account/__init__.py +0 -0
  32. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/account/oauth_resource_group.py +0 -0
  33. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/account/orgs_resource_group.py +0 -0
  34. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/account/search_resource_group.py +0 -0
  35. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/account/users_resource_group.py +0 -0
  36. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/collaboration/__init__.py +0 -0
  37. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/collaboration/_helpers.py +0 -0
  38. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/collaboration/labels_resource_group.py +0 -0
  39. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/collaboration/members_resource_group.py +0 -0
  40. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/collaboration/milestones_resource_group.py +0 -0
  41. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/collaboration/pulls_resource_group.py +0 -0
  42. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/misc/__init__.py +0 -0
  43. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/misc/releases_resource_group.py +0 -0
  44. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/misc/tags_resource_group.py +0 -0
  45. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/misc/webhooks_resource_group.py +0 -0
  46. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/repositories/__init__.py +0 -0
  47. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/repositories/branches_resource_group.py +0 -0
  48. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/repositories/commits_resource_group.py +0 -0
  49. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/repositories/repo_contents_resource_group.py +0 -0
  50. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/resources/repositories/repos_resource_group.py +0 -0
  51. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/run_mcp.py +0 -0
  52. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api/utils.py +0 -0
  53. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api.egg-info/SOURCES.txt +0 -0
  54. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api.egg-info/dependency_links.txt +0 -0
  55. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api.egg-info/entry_points.txt +0 -0
  56. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api.egg-info/requires.txt +0 -0
  57. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/gitcode_api.egg-info/top_level.txt +0 -0
  58. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/setup.cfg +0 -0
  59. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/tests/test_base_client.py +0 -0
  60. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/tests/test_build_manifest.py +0 -0
  61. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/tests/test_cli.py +0 -0
  62. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/tests/test_client.py +0 -0
  63. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/tests/test_collaboration_templates.py +0 -0
  64. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/tests/test_llm_tools.py +0 -0
  65. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/tests/test_models.py +0 -0
  66. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/tests/test_resources_account.py +0 -0
  67. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/tests/test_resources_collaboration.py +0 -0
  68. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/tests/test_resources_misc.py +0 -0
  69. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/tests/test_resources_repositories.py +0 -0
  70. {gitcode_api-1.3.0 → gitcode_api-1.3.1}/tests/test_utils.py +0 -0
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitcode-api
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  Summary: Easy to use Python SDK for the GitCode REST API. Providing builtin CLI tool, and optional LLM integration (MCP, OpenAI tool, and openJiuwen tool) for agents. Community-maintained.
5
- Author-email: Hugo Huang <hugo@hugohuang.com>
5
+ Author-email: "Hugo (Jin Huang)" <hugo@hugohuang.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Changelog, https://gitcode-api.readthedocs.io/en/latest/changelog.html
8
8
  Project-URL: Issues, https://github.com/Trenza1ore/GitCode-API/issues
@@ -12,7 +12,7 @@ Project-URL: Github, https://github.com/Trenza1ore/GitCode-API
12
12
  Project-URL: Homepage, https://hugohuang.com/gitcode-api
13
13
  Project-URL: Author, https://hugohuang.com
14
14
  Keywords: gitcode,git,devops,api,sdk,python,httpx,client,mcp,agent,fastmcp,llm,openjiuwen,mcp client,mcp server,model context protocol
15
- Classifier: Development Status :: 4 - Beta
15
+ Classifier: Development Status :: 5 - Production/Stable
16
16
  Classifier: Programming Language :: Python
17
17
  Classifier: Programming Language :: Python :: Implementation :: CPython
18
18
  Classifier: Programming Language :: Python :: 3
@@ -35,15 +35,12 @@ Provides-Extra: mcp
35
35
  Requires-Dist: fastmcp; python_version >= "3.10" and extra == "mcp"
36
36
  Dynamic: license-file
37
37
 
38
- # GitCode-API
39
-
40
- [![PyPI - Version](https://img.shields.io/pypi/v/gitcode-api?link=https%3A%2F%2Fpypi.org%2Fproject%2Fgitcode-api%2F&uuid=96abf98469db4ee7bc12ded4646e76d9)](https://pypi.org/project/gitcode-api) [![PyPI Downloads](https://static.pepy.tech/personalized-badge/gitcode-api?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=RED&left_text=downloads&uuid=96abf98469db4ee7bc12ded4646e76d9)](https://pepy.tech/projects/gitcode-api)
41
- [![Install in Cursor](https://img.shields.io/badge/Install_in-Cursor-000000?logoColor=white)](https://cursor.com/en/install-mcp?name=GitCode%20API&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnaXRjb2RlLWFwaVttY3BdIiwiZ2l0Y29kZS1hcGkiLCJzZXJ2ZSJdLCJlbnYiOnsiR0lUQ09ERV9BQ0NFU1NfVE9LRU4iOiIke2lucHV0OmdpdGNvZGVfYWNjZXNzX3Rva2VufSJ9LCJpbnB1dHMiOlt7ImlkIjoiZ2l0Y29kZV9hY2Nlc3NfdG9rZW4iLCJ0eXBlIjoicHJvbXB0U3RyaW5nIiwiZGVzY3JpcHRpb24iOiJFbnRlciBHSVRDT0RFX0FDQ0VTU19UT0tFTiIsInBhc3N3b3JkIjp0cnVlfV19) [![Install in VS Code](https://img.shields.io/badge/Install_in-VS_Code-0098FF?logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=GitCode%20API&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22gitcode-api%5Bmcp%5D%22%2C%22gitcode-api%22%2C%22serve%22%5D%2C%22env%22%3A%7B%22GITCODE_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitcode_access_token%7D%22%7D%2C%22inputs%22%3A%5B%7B%22id%22%3A%22gitcode_access_token%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Enter%20GITCODE_ACCESS_TOKEN%22%2C%22password%22%3Atrue%7D%5D%7D)
42
- [![GitHub Badge](https://img.shields.io/badge/github-repo-blue?logo=github&link=https%3A%2F%2Fgithub.com%2FTrenza1ore%2FGitCode-API)](https://github.com/Trenza1ore/GitCode-API) [![GitCode Badge](https://img.shields.io/badge/gitcode-repo-brown?logo=gitcode&link=https%3A%2F%2Fgitcode.com%2FSushiNinja%2FGitCode-API)](https://gitcode.com/SushiNinja/GitCode-API) [![CI Badge](https://github.com/Trenza1ore/GitCode-API/actions/workflows/check-code.yml/badge.svg?uuid=96abf98469db4ee7bc12ded4646e76d9)](https://github.com/Trenza1ore/GitCode-API/actions/workflows/check-code.yml/)
38
+ # GitCode-API [![GitCode Badge](https://img.shields.io/badge/gitcode-brown?logo=gitcode&link=https%3A%2F%2Fgitcode.com%2FSushiNinja%2FGitCode-API)](https://gitcode.com/SushiNinja/GitCode-API) [![GitHub Badge](https://img.shields.io/badge/github-black?logo=github&link=https%3A%2F%2Fgithub.com%2FTrenza1ore%2FGitCode-API)](https://github.com/Trenza1ore/GitCode-API)
39
+ [![PyPI - Version](https://img.shields.io/pypi/v/gitcode-api?color=blue&uuid=96abf98469db4ee7bc12ded4646e76d9)](https://pypi.org/project/gitcode-api) [![PyPI - Downloads](https://img.shields.io/pypi/dm/gitcode-api?color=blue&logo=pypi&logoColor=white&label=PyPI%20%E2%86%93&uuid=96abf98469db4ee7bc12ded4646e76d9)](https://pepy.tech/projects/gitcode-api) ![MCP Bundle Downloads](https://img.shields.io/github/downloads/Trenza1ore/GitCode-API/total?color=blue&logo=modelcontextprotocol&label=MCPB%20%E2%86%93&uuid=96abf98469db4ee7bc12ded4646e76d9)
43
40
 
44
41
  [![Docs](https://img.shields.io/badge/%E6%96%87%E6%A1%A3-Docs-cyan?style=for-the-badge&logo=readthedocs&link=https%3A%2F%2Fgitcode-api.readthedocs.io%2Fen%2Flatest%2Findex.html)](https://gitcode-api.readthedocs.io) [![中文README](https://img.shields.io/badge/%E4%B8%AD%E6%96%87-README-brown?style=for-the-badge&logo=googledocs&link=README.zh.md)](README.zh.md)
45
42
 
46
- `gitcode-api` is a community-maintained Python SDK for the GitCode REST API. It provides easy-to-use synchronous and asynchronous clients, repository-scoped helpers, and lightweight response models so you can work with GitCode from Python without hand-writing raw HTTP requests. The `gitcode_api.llm` module adds an OpenAI-style function tool, an MCP service, and an [openJiuwen](https://openjiuwen.com) tool integration so agents can reuse the same resource-oriented API.
43
+ `gitcode-api` is a community-maintained Python SDK for the GitCode REST API. It provides easy-to-use synchronous and asynchronous clients, helpers methods grouped by resource groups, and type-hinted response models so you can work with GitCode from Python without hand-writing raw HTTP requests. The `gitcode_api.llm` module adds an OpenAI-style function tool, an MCP service, and an [openJiuwen](https://openjiuwen.com) tool integration so agents can reuse the same resource-oriented API.
47
44
 
48
45
  ## Why This Project
49
46
 
@@ -51,7 +48,7 @@ Dynamic: license-file
51
48
  - Sync and async clients with a consistent API surface.
52
49
  - Convenient methods not offered by REST API directly: such as fetching Issue and PR templates.
53
50
  - Resource groups such as `client.repos`, `client.pulls`, and `client.users`.
54
- - Repository defaults via `owner=` and `repo=` on the client.
51
+ - Repository defaults via `owner` and `repo` on the client.
55
52
  - Sphinx docs plus a mirrored GitCode REST API reference in `docs/`.
56
53
  - Provides MCP server, OpenAI tool, and [openJiuwen](https://openjiuwen.com) tool for LLM agent usage.
57
54
  - Provide MCP service that directly installs to your IDE of choice, such as Cursor and VS Code!
@@ -77,14 +74,14 @@ For detailed setup (including installing to services like Claude Code / Codex):
77
74
 
78
75
  ## Authentication
79
76
 
80
- Pass `api_key=` directly, or set `GITCODE_ACCESS_TOKEN` in your environment:
77
+ Pass `api_key` directly, or set `GITCODE_ACCESS_TOKEN` in your environment:
81
78
 
82
79
  ```bash
83
80
  export GITCODE_ACCESS_TOKEN="your-token"
84
81
  ```
85
82
 
86
- If your token is stored in encrypted form, pass `decrypt=` to decode either an
87
- encrypted `api_key=` value or an encrypted `GITCODE_ACCESS_TOKEN` value before
83
+ If your token is stored in encrypted form, pass `decrypt` to decode either an
84
+ encrypted `api_key` value or an encrypted `GITCODE_ACCESS_TOKEN` value before
88
85
  the client uses it.
89
86
 
90
87
  ```python
@@ -171,7 +168,7 @@ meta = as_dict(repo) # dict
171
168
 
172
169
  ### Context managers
173
170
 
174
- `GitCode` and `AsyncGitCode` (and the lower-level `SyncAPIClient` / `AsyncAPIClient`) support `with` / `async with`. Leaving the block calls `close()` / `await close()` on the underlying client automatically, including a custom `http_client=` you passed in. `close()` also clears the LRU cache used by each resource group's `method_signature(...)` helper (see the [Available Resources](#available-resources) section).
171
+ `GitCode` and `AsyncGitCode` (and the lower-level `SyncAPIClient` / `AsyncAPIClient`) support `with` / `async with`. Leaving the block calls `close()` / `await close()` on the underlying client automatically, including a custom `http_client` you passed in. `close()` also clears the LRU cache used by each resource group's `method_signature(...)` helper (see the [Available Resources](#available-resources) section).
175
172
 
176
173
  ```python
177
174
  from gitcode_api import GitCode
@@ -328,7 +325,7 @@ while True:
328
325
  pip install 'gitcode-api[mcp]'
329
326
  ```
330
327
 
331
- - **`create_mcp_server`** — builds a `FastMCP` instance with `gitcode_api_tool` already registered; optional `name=`, `tool=`, and extra keyword arguments are forwarded to `FastMCP(...)`.
328
+ - **`create_mcp_server`** — builds a `FastMCP` instance with `gitcode_api_tool` already registered; optional `name`, `tool`, and extra keyword arguments are forwarded to `FastMCP(...)`.
332
329
  - **`GitCodeMCP`** — thin wrapper that constructs that server and registers the tool; unknown attributes are delegated to the underlying `FastMCP` object (for example transport helpers exposed by your FastMCP version).
333
330
  - **`create_mcp_gitcode_api_tool`** — returns the standalone async callable used as the tool body (for custom wiring).
334
331
  - **`register_mcp_gitcode_api_tool`** — attaches that callable to an existing FastMCP-compatible object (`mcp.tool(...)` or `mcp.add_tool(...)`).
@@ -342,7 +339,7 @@ mcp = create_mcp_server(name="GitCode API", owner="SushiNinja", repo="GitCode-AP
342
339
 
343
340
  The same server is available from the CLI as `gitcode-api serve` (see the [CLI](#cli) section).
344
341
 
345
- To share auth or clients across tools, build `GitCodeLLMTool` once (`from gitcode_api.llm._tool import GitCodeLLMTool`) and pass it as `tool=` into `GitCodeMCP`, `create_mcp_server`, `register_mcp_gitcode_api_tool`, or `create_mcp_gitcode_api_tool`.
342
+ To share auth or clients across tools, build `GitCodeLLMTool` once (`from gitcode_api.llm._tool import GitCodeLLMTool`) and pass it as `tool` into `GitCodeMCP`, `create_mcp_server`, `register_mcp_gitcode_api_tool`, or `create_mcp_gitcode_api_tool`.
346
343
 
347
344
  ### openJiuwen (`LocalFunction`)
348
345
 
@@ -360,7 +357,7 @@ jiuwen_tool = create_openjiuwen_gitcode_api_tool(owner="SushiNinja", repo="GitCo
360
357
  # await jiuwen_tool.invoke({"op_type": "repos", "action": "get", "params": {}})
361
358
  ```
362
359
 
363
- Optional `name=` and `description=` override the default tool card. Constructor options otherwise mirror `GitCode` / `AsyncGitCode` (`client=`, `async_client=`, `api_key=`, `owner=`, `repo=`, `base_url=`, `timeout=`, `decrypt=`).
360
+ Optional `name` and `description` override the default tool card. Constructor options otherwise mirror `GitCode` / `AsyncGitCode` (`client`, `async_client`, `api_key`, `owner`, `repo`, `base_url`, `timeout`, `decrypt`).
364
361
 
365
362
  **Claude Desktop (MCPB):** published GitHub Releases include a `gitcode-<version>.mcpb` bundle for one-click installation as a Claude Desktop extension; see Anthropic’s guide, [Build a desktop extension with MCPB](https://claude.com/docs/connectors/building/mcpb). From a checkout you can run `make mcpb` (requires the [`@anthropic-ai/mcpb`](https://www.npmjs.com/package/@anthropic-ai/mcpb) CLI on your `PATH`).
366
363
 
@@ -431,7 +428,7 @@ with GitCode(
431
428
 
432
429
  Use `httpx.AsyncClient(verify=...)` with `AsyncGitCode` for async code.
433
430
 
434
- The OpenAI tool (`GitCodeOpenAITool`), MCP helpers, and `create_openjiuwen_gitcode_api_tool` accept the same `client=` / `async_client=` arguments (OpenAI and MCP also accept a shared `GitCodeLLMTool` via `tool=`). Build `GitCode` / `AsyncGitCode` with your custom `http_client` once and pass it through so LLM tool calls reuse the same TLS settings.
431
+ The OpenAI tool (`GitCodeOpenAITool`), MCP helpers, and `create_openjiuwen_gitcode_api_tool` accept the same `client` / `async_client` arguments (OpenAI and MCP also accept a shared `GitCodeLLMTool` via `tool`). Build `GitCode` / `AsyncGitCode` with your custom `http_client` once and pass it through so LLM tool calls reuse the same TLS settings.
435
432
 
436
433
  ## Project Status
437
434
 
@@ -1,12 +1,9 @@
1
- # GitCode-API
2
-
3
- [![PyPI - Version](https://img.shields.io/pypi/v/gitcode-api?link=https%3A%2F%2Fpypi.org%2Fproject%2Fgitcode-api%2F&uuid=96abf98469db4ee7bc12ded4646e76d9)](https://pypi.org/project/gitcode-api) [![PyPI Downloads](https://static.pepy.tech/personalized-badge/gitcode-api?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=RED&left_text=downloads&uuid=96abf98469db4ee7bc12ded4646e76d9)](https://pepy.tech/projects/gitcode-api)
4
- [![Install in Cursor](https://img.shields.io/badge/Install_in-Cursor-000000?logoColor=white)](https://cursor.com/en/install-mcp?name=GitCode%20API&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnaXRjb2RlLWFwaVttY3BdIiwiZ2l0Y29kZS1hcGkiLCJzZXJ2ZSJdLCJlbnYiOnsiR0lUQ09ERV9BQ0NFU1NfVE9LRU4iOiIke2lucHV0OmdpdGNvZGVfYWNjZXNzX3Rva2VufSJ9LCJpbnB1dHMiOlt7ImlkIjoiZ2l0Y29kZV9hY2Nlc3NfdG9rZW4iLCJ0eXBlIjoicHJvbXB0U3RyaW5nIiwiZGVzY3JpcHRpb24iOiJFbnRlciBHSVRDT0RFX0FDQ0VTU19UT0tFTiIsInBhc3N3b3JkIjp0cnVlfV19) [![Install in VS Code](https://img.shields.io/badge/Install_in-VS_Code-0098FF?logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=GitCode%20API&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22gitcode-api%5Bmcp%5D%22%2C%22gitcode-api%22%2C%22serve%22%5D%2C%22env%22%3A%7B%22GITCODE_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitcode_access_token%7D%22%7D%2C%22inputs%22%3A%5B%7B%22id%22%3A%22gitcode_access_token%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Enter%20GITCODE_ACCESS_TOKEN%22%2C%22password%22%3Atrue%7D%5D%7D)
5
- [![GitHub Badge](https://img.shields.io/badge/github-repo-blue?logo=github&link=https%3A%2F%2Fgithub.com%2FTrenza1ore%2FGitCode-API)](https://github.com/Trenza1ore/GitCode-API) [![GitCode Badge](https://img.shields.io/badge/gitcode-repo-brown?logo=gitcode&link=https%3A%2F%2Fgitcode.com%2FSushiNinja%2FGitCode-API)](https://gitcode.com/SushiNinja/GitCode-API) [![CI Badge](https://github.com/Trenza1ore/GitCode-API/actions/workflows/check-code.yml/badge.svg?uuid=96abf98469db4ee7bc12ded4646e76d9)](https://github.com/Trenza1ore/GitCode-API/actions/workflows/check-code.yml/)
1
+ # GitCode-API [![GitCode Badge](https://img.shields.io/badge/gitcode-brown?logo=gitcode&link=https%3A%2F%2Fgitcode.com%2FSushiNinja%2FGitCode-API)](https://gitcode.com/SushiNinja/GitCode-API) [![GitHub Badge](https://img.shields.io/badge/github-black?logo=github&link=https%3A%2F%2Fgithub.com%2FTrenza1ore%2FGitCode-API)](https://github.com/Trenza1ore/GitCode-API)
2
+ [![PyPI - Version](https://img.shields.io/pypi/v/gitcode-api?color=blue&uuid=96abf98469db4ee7bc12ded4646e76d9)](https://pypi.org/project/gitcode-api) [![PyPI - Downloads](https://img.shields.io/pypi/dm/gitcode-api?color=blue&logo=pypi&logoColor=white&label=PyPI%20%E2%86%93&uuid=96abf98469db4ee7bc12ded4646e76d9)](https://pepy.tech/projects/gitcode-api) ![MCP Bundle Downloads](https://img.shields.io/github/downloads/Trenza1ore/GitCode-API/total?color=blue&logo=modelcontextprotocol&label=MCPB%20%E2%86%93&uuid=96abf98469db4ee7bc12ded4646e76d9)
6
3
 
7
4
  [![Docs](https://img.shields.io/badge/%E6%96%87%E6%A1%A3-Docs-cyan?style=for-the-badge&logo=readthedocs&link=https%3A%2F%2Fgitcode-api.readthedocs.io%2Fen%2Flatest%2Findex.html)](https://gitcode-api.readthedocs.io) [![中文README](https://img.shields.io/badge/%E4%B8%AD%E6%96%87-README-brown?style=for-the-badge&logo=googledocs&link=README.zh.md)](README.zh.md)
8
5
 
9
- `gitcode-api` is a community-maintained Python SDK for the GitCode REST API. It provides easy-to-use synchronous and asynchronous clients, repository-scoped helpers, and lightweight response models so you can work with GitCode from Python without hand-writing raw HTTP requests. The `gitcode_api.llm` module adds an OpenAI-style function tool, an MCP service, and an [openJiuwen](https://openjiuwen.com) tool integration so agents can reuse the same resource-oriented API.
6
+ `gitcode-api` is a community-maintained Python SDK for the GitCode REST API. It provides easy-to-use synchronous and asynchronous clients, helpers methods grouped by resource groups, and type-hinted response models so you can work with GitCode from Python without hand-writing raw HTTP requests. The `gitcode_api.llm` module adds an OpenAI-style function tool, an MCP service, and an [openJiuwen](https://openjiuwen.com) tool integration so agents can reuse the same resource-oriented API.
10
7
 
11
8
  ## Why This Project
12
9
 
@@ -14,7 +11,7 @@
14
11
  - Sync and async clients with a consistent API surface.
15
12
  - Convenient methods not offered by REST API directly: such as fetching Issue and PR templates.
16
13
  - Resource groups such as `client.repos`, `client.pulls`, and `client.users`.
17
- - Repository defaults via `owner=` and `repo=` on the client.
14
+ - Repository defaults via `owner` and `repo` on the client.
18
15
  - Sphinx docs plus a mirrored GitCode REST API reference in `docs/`.
19
16
  - Provides MCP server, OpenAI tool, and [openJiuwen](https://openjiuwen.com) tool for LLM agent usage.
20
17
  - Provide MCP service that directly installs to your IDE of choice, such as Cursor and VS Code!
@@ -40,14 +37,14 @@ For detailed setup (including installing to services like Claude Code / Codex):
40
37
 
41
38
  ## Authentication
42
39
 
43
- Pass `api_key=` directly, or set `GITCODE_ACCESS_TOKEN` in your environment:
40
+ Pass `api_key` directly, or set `GITCODE_ACCESS_TOKEN` in your environment:
44
41
 
45
42
  ```bash
46
43
  export GITCODE_ACCESS_TOKEN="your-token"
47
44
  ```
48
45
 
49
- If your token is stored in encrypted form, pass `decrypt=` to decode either an
50
- encrypted `api_key=` value or an encrypted `GITCODE_ACCESS_TOKEN` value before
46
+ If your token is stored in encrypted form, pass `decrypt` to decode either an
47
+ encrypted `api_key` value or an encrypted `GITCODE_ACCESS_TOKEN` value before
51
48
  the client uses it.
52
49
 
53
50
  ```python
@@ -134,7 +131,7 @@ meta = as_dict(repo) # dict
134
131
 
135
132
  ### Context managers
136
133
 
137
- `GitCode` and `AsyncGitCode` (and the lower-level `SyncAPIClient` / `AsyncAPIClient`) support `with` / `async with`. Leaving the block calls `close()` / `await close()` on the underlying client automatically, including a custom `http_client=` you passed in. `close()` also clears the LRU cache used by each resource group's `method_signature(...)` helper (see the [Available Resources](#available-resources) section).
134
+ `GitCode` and `AsyncGitCode` (and the lower-level `SyncAPIClient` / `AsyncAPIClient`) support `with` / `async with`. Leaving the block calls `close()` / `await close()` on the underlying client automatically, including a custom `http_client` you passed in. `close()` also clears the LRU cache used by each resource group's `method_signature(...)` helper (see the [Available Resources](#available-resources) section).
138
135
 
139
136
  ```python
140
137
  from gitcode_api import GitCode
@@ -291,7 +288,7 @@ while True:
291
288
  pip install 'gitcode-api[mcp]'
292
289
  ```
293
290
 
294
- - **`create_mcp_server`** — builds a `FastMCP` instance with `gitcode_api_tool` already registered; optional `name=`, `tool=`, and extra keyword arguments are forwarded to `FastMCP(...)`.
291
+ - **`create_mcp_server`** — builds a `FastMCP` instance with `gitcode_api_tool` already registered; optional `name`, `tool`, and extra keyword arguments are forwarded to `FastMCP(...)`.
295
292
  - **`GitCodeMCP`** — thin wrapper that constructs that server and registers the tool; unknown attributes are delegated to the underlying `FastMCP` object (for example transport helpers exposed by your FastMCP version).
296
293
  - **`create_mcp_gitcode_api_tool`** — returns the standalone async callable used as the tool body (for custom wiring).
297
294
  - **`register_mcp_gitcode_api_tool`** — attaches that callable to an existing FastMCP-compatible object (`mcp.tool(...)` or `mcp.add_tool(...)`).
@@ -305,7 +302,7 @@ mcp = create_mcp_server(name="GitCode API", owner="SushiNinja", repo="GitCode-AP
305
302
 
306
303
  The same server is available from the CLI as `gitcode-api serve` (see the [CLI](#cli) section).
307
304
 
308
- To share auth or clients across tools, build `GitCodeLLMTool` once (`from gitcode_api.llm._tool import GitCodeLLMTool`) and pass it as `tool=` into `GitCodeMCP`, `create_mcp_server`, `register_mcp_gitcode_api_tool`, or `create_mcp_gitcode_api_tool`.
305
+ To share auth or clients across tools, build `GitCodeLLMTool` once (`from gitcode_api.llm._tool import GitCodeLLMTool`) and pass it as `tool` into `GitCodeMCP`, `create_mcp_server`, `register_mcp_gitcode_api_tool`, or `create_mcp_gitcode_api_tool`.
309
306
 
310
307
  ### openJiuwen (`LocalFunction`)
311
308
 
@@ -323,7 +320,7 @@ jiuwen_tool = create_openjiuwen_gitcode_api_tool(owner="SushiNinja", repo="GitCo
323
320
  # await jiuwen_tool.invoke({"op_type": "repos", "action": "get", "params": {}})
324
321
  ```
325
322
 
326
- Optional `name=` and `description=` override the default tool card. Constructor options otherwise mirror `GitCode` / `AsyncGitCode` (`client=`, `async_client=`, `api_key=`, `owner=`, `repo=`, `base_url=`, `timeout=`, `decrypt=`).
323
+ Optional `name` and `description` override the default tool card. Constructor options otherwise mirror `GitCode` / `AsyncGitCode` (`client`, `async_client`, `api_key`, `owner`, `repo`, `base_url`, `timeout`, `decrypt`).
327
324
 
328
325
  **Claude Desktop (MCPB):** published GitHub Releases include a `gitcode-<version>.mcpb` bundle for one-click installation as a Claude Desktop extension; see Anthropic’s guide, [Build a desktop extension with MCPB](https://claude.com/docs/connectors/building/mcpb). From a checkout you can run `make mcpb` (requires the [`@anthropic-ai/mcpb`](https://www.npmjs.com/package/@anthropic-ai/mcpb) CLI on your `PATH`).
329
326
 
@@ -394,7 +391,7 @@ with GitCode(
394
391
 
395
392
  Use `httpx.AsyncClient(verify=...)` with `AsyncGitCode` for async code.
396
393
 
397
- The OpenAI tool (`GitCodeOpenAITool`), MCP helpers, and `create_openjiuwen_gitcode_api_tool` accept the same `client=` / `async_client=` arguments (OpenAI and MCP also accept a shared `GitCodeLLMTool` via `tool=`). Build `GitCode` / `AsyncGitCode` with your custom `http_client` once and pass it through so LLM tool calls reuse the same TLS settings.
394
+ The OpenAI tool (`GitCodeOpenAITool`), MCP helpers, and `create_openjiuwen_gitcode_api_tool` accept the same `client` / `async_client` arguments (OpenAI and MCP also accept a shared `GitCodeLLMTool` via `tool`). Build `GitCode` / `AsyncGitCode` with your custom `http_client` once and pass it through so LLM tool calls reuse the same TLS settings.
398
395
 
399
396
  ## Project Status
400
397
 
@@ -136,7 +136,7 @@ def create_mcp_server(name: str = "GitCode API", tool: Optional[GitCodeLLMTool]
136
136
  :param name: MCP server display name.
137
137
  :param tool: Optional preconfigured :class:`~gitcode_api.llm._tool.GitCodeLLMTool`.
138
138
  :param kwargs: Forwarded to :class:`GitCodeMCP` and then to ``fastmcp.FastMCP`` (for example
139
- ``instructions=`` to override the default server instructions).
139
+ ``instructions`` to override the default server instructions).
140
140
  :returns: Configured ``FastMCP`` instance with ``gitcode_api_tool`` registered.
141
141
  """
142
142
  return GitCodeMCP(name=name, tool=tool, **kwargs).mcp
@@ -76,6 +76,8 @@ class AbstractIssuesResource(ABC):
76
76
  labels: Optional[List[str]] = None,
77
77
  milestone: Union[int, str, None] = None,
78
78
  security_hole: Optional[str] = None,
79
+ template_path: Optional[str] = None,
80
+ **kwargs,
79
81
  ) -> Issue:
80
82
  """Create an issue for a repository.
81
83
 
@@ -87,6 +89,9 @@ class AbstractIssuesResource(ABC):
87
89
  :param labels: Optional label names.
88
90
  :param milestone: Optional milestone identifier.
89
91
  :param security_hole: Whether the issue is private; form field described in the Issues API (default public).
92
+ :param template_path: issue template path, project templates support files under the .gitcode, .github, .gitee
93
+ directories, and organization templates only support files under the .gitcode directory of .gitcode repo.
94
+ :param kwargs: Forwarded directly, useful since GitCode has awful documentation...
90
95
  :returns: Created issue details.
91
96
  """
92
97
 
@@ -400,6 +405,8 @@ class IssuesResource(SyncResource, AbstractIssuesResource):
400
405
  labels: Optional[List[str]] = None,
401
406
  milestone: Union[int, str, None] = None,
402
407
  security_hole: Optional[str] = None,
408
+ template_path: Optional[str] = None,
409
+ **kwargs,
403
410
  ) -> Issue:
404
411
  resolved_repo = repo or self._client.repo
405
412
  return self._model(
@@ -414,7 +421,8 @@ class IssuesResource(SyncResource, AbstractIssuesResource):
414
421
  "labels": _comma_join(labels),
415
422
  "milestone": milestone,
416
423
  "security_hole": security_hole,
417
- },
424
+ "template_path": template_path,
425
+ } | kwargs,
418
426
  )
419
427
 
420
428
  def update(
@@ -659,6 +667,8 @@ class AsyncIssuesResource(AsyncResource, AbstractIssuesResource):
659
667
  labels: Optional[List[str]] = None,
660
668
  milestone: Union[int, str, None] = None,
661
669
  security_hole: Optional[str] = None,
670
+ template_path: Optional[str] = None,
671
+ **kwargs,
662
672
  ) -> Issue:
663
673
  resolved_repo = repo or self._client.repo
664
674
  return await self._model(
@@ -673,6 +683,7 @@ class AsyncIssuesResource(AsyncResource, AbstractIssuesResource):
673
683
  "labels": _comma_join(labels),
674
684
  "milestone": milestone,
675
685
  "security_hole": security_hole,
686
+ "template_path": template_path,
676
687
  },
677
688
  )
678
689
 
@@ -0,0 +1 @@
1
+ 1.3.1
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitcode-api
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  Summary: Easy to use Python SDK for the GitCode REST API. Providing builtin CLI tool, and optional LLM integration (MCP, OpenAI tool, and openJiuwen tool) for agents. Community-maintained.
5
- Author-email: Hugo Huang <hugo@hugohuang.com>
5
+ Author-email: "Hugo (Jin Huang)" <hugo@hugohuang.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Changelog, https://gitcode-api.readthedocs.io/en/latest/changelog.html
8
8
  Project-URL: Issues, https://github.com/Trenza1ore/GitCode-API/issues
@@ -12,7 +12,7 @@ Project-URL: Github, https://github.com/Trenza1ore/GitCode-API
12
12
  Project-URL: Homepage, https://hugohuang.com/gitcode-api
13
13
  Project-URL: Author, https://hugohuang.com
14
14
  Keywords: gitcode,git,devops,api,sdk,python,httpx,client,mcp,agent,fastmcp,llm,openjiuwen,mcp client,mcp server,model context protocol
15
- Classifier: Development Status :: 4 - Beta
15
+ Classifier: Development Status :: 5 - Production/Stable
16
16
  Classifier: Programming Language :: Python
17
17
  Classifier: Programming Language :: Python :: Implementation :: CPython
18
18
  Classifier: Programming Language :: Python :: 3
@@ -35,15 +35,12 @@ Provides-Extra: mcp
35
35
  Requires-Dist: fastmcp; python_version >= "3.10" and extra == "mcp"
36
36
  Dynamic: license-file
37
37
 
38
- # GitCode-API
39
-
40
- [![PyPI - Version](https://img.shields.io/pypi/v/gitcode-api?link=https%3A%2F%2Fpypi.org%2Fproject%2Fgitcode-api%2F&uuid=96abf98469db4ee7bc12ded4646e76d9)](https://pypi.org/project/gitcode-api) [![PyPI Downloads](https://static.pepy.tech/personalized-badge/gitcode-api?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=RED&left_text=downloads&uuid=96abf98469db4ee7bc12ded4646e76d9)](https://pepy.tech/projects/gitcode-api)
41
- [![Install in Cursor](https://img.shields.io/badge/Install_in-Cursor-000000?logoColor=white)](https://cursor.com/en/install-mcp?name=GitCode%20API&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnaXRjb2RlLWFwaVttY3BdIiwiZ2l0Y29kZS1hcGkiLCJzZXJ2ZSJdLCJlbnYiOnsiR0lUQ09ERV9BQ0NFU1NfVE9LRU4iOiIke2lucHV0OmdpdGNvZGVfYWNjZXNzX3Rva2VufSJ9LCJpbnB1dHMiOlt7ImlkIjoiZ2l0Y29kZV9hY2Nlc3NfdG9rZW4iLCJ0eXBlIjoicHJvbXB0U3RyaW5nIiwiZGVzY3JpcHRpb24iOiJFbnRlciBHSVRDT0RFX0FDQ0VTU19UT0tFTiIsInBhc3N3b3JkIjp0cnVlfV19) [![Install in VS Code](https://img.shields.io/badge/Install_in-VS_Code-0098FF?logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=GitCode%20API&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22gitcode-api%5Bmcp%5D%22%2C%22gitcode-api%22%2C%22serve%22%5D%2C%22env%22%3A%7B%22GITCODE_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitcode_access_token%7D%22%7D%2C%22inputs%22%3A%5B%7B%22id%22%3A%22gitcode_access_token%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Enter%20GITCODE_ACCESS_TOKEN%22%2C%22password%22%3Atrue%7D%5D%7D)
42
- [![GitHub Badge](https://img.shields.io/badge/github-repo-blue?logo=github&link=https%3A%2F%2Fgithub.com%2FTrenza1ore%2FGitCode-API)](https://github.com/Trenza1ore/GitCode-API) [![GitCode Badge](https://img.shields.io/badge/gitcode-repo-brown?logo=gitcode&link=https%3A%2F%2Fgitcode.com%2FSushiNinja%2FGitCode-API)](https://gitcode.com/SushiNinja/GitCode-API) [![CI Badge](https://github.com/Trenza1ore/GitCode-API/actions/workflows/check-code.yml/badge.svg?uuid=96abf98469db4ee7bc12ded4646e76d9)](https://github.com/Trenza1ore/GitCode-API/actions/workflows/check-code.yml/)
38
+ # GitCode-API [![GitCode Badge](https://img.shields.io/badge/gitcode-brown?logo=gitcode&link=https%3A%2F%2Fgitcode.com%2FSushiNinja%2FGitCode-API)](https://gitcode.com/SushiNinja/GitCode-API) [![GitHub Badge](https://img.shields.io/badge/github-black?logo=github&link=https%3A%2F%2Fgithub.com%2FTrenza1ore%2FGitCode-API)](https://github.com/Trenza1ore/GitCode-API)
39
+ [![PyPI - Version](https://img.shields.io/pypi/v/gitcode-api?color=blue&uuid=96abf98469db4ee7bc12ded4646e76d9)](https://pypi.org/project/gitcode-api) [![PyPI - Downloads](https://img.shields.io/pypi/dm/gitcode-api?color=blue&logo=pypi&logoColor=white&label=PyPI%20%E2%86%93&uuid=96abf98469db4ee7bc12ded4646e76d9)](https://pepy.tech/projects/gitcode-api) ![MCP Bundle Downloads](https://img.shields.io/github/downloads/Trenza1ore/GitCode-API/total?color=blue&logo=modelcontextprotocol&label=MCPB%20%E2%86%93&uuid=96abf98469db4ee7bc12ded4646e76d9)
43
40
 
44
41
  [![Docs](https://img.shields.io/badge/%E6%96%87%E6%A1%A3-Docs-cyan?style=for-the-badge&logo=readthedocs&link=https%3A%2F%2Fgitcode-api.readthedocs.io%2Fen%2Flatest%2Findex.html)](https://gitcode-api.readthedocs.io) [![中文README](https://img.shields.io/badge/%E4%B8%AD%E6%96%87-README-brown?style=for-the-badge&logo=googledocs&link=README.zh.md)](README.zh.md)
45
42
 
46
- `gitcode-api` is a community-maintained Python SDK for the GitCode REST API. It provides easy-to-use synchronous and asynchronous clients, repository-scoped helpers, and lightweight response models so you can work with GitCode from Python without hand-writing raw HTTP requests. The `gitcode_api.llm` module adds an OpenAI-style function tool, an MCP service, and an [openJiuwen](https://openjiuwen.com) tool integration so agents can reuse the same resource-oriented API.
43
+ `gitcode-api` is a community-maintained Python SDK for the GitCode REST API. It provides easy-to-use synchronous and asynchronous clients, helpers methods grouped by resource groups, and type-hinted response models so you can work with GitCode from Python without hand-writing raw HTTP requests. The `gitcode_api.llm` module adds an OpenAI-style function tool, an MCP service, and an [openJiuwen](https://openjiuwen.com) tool integration so agents can reuse the same resource-oriented API.
47
44
 
48
45
  ## Why This Project
49
46
 
@@ -51,7 +48,7 @@ Dynamic: license-file
51
48
  - Sync and async clients with a consistent API surface.
52
49
  - Convenient methods not offered by REST API directly: such as fetching Issue and PR templates.
53
50
  - Resource groups such as `client.repos`, `client.pulls`, and `client.users`.
54
- - Repository defaults via `owner=` and `repo=` on the client.
51
+ - Repository defaults via `owner` and `repo` on the client.
55
52
  - Sphinx docs plus a mirrored GitCode REST API reference in `docs/`.
56
53
  - Provides MCP server, OpenAI tool, and [openJiuwen](https://openjiuwen.com) tool for LLM agent usage.
57
54
  - Provide MCP service that directly installs to your IDE of choice, such as Cursor and VS Code!
@@ -77,14 +74,14 @@ For detailed setup (including installing to services like Claude Code / Codex):
77
74
 
78
75
  ## Authentication
79
76
 
80
- Pass `api_key=` directly, or set `GITCODE_ACCESS_TOKEN` in your environment:
77
+ Pass `api_key` directly, or set `GITCODE_ACCESS_TOKEN` in your environment:
81
78
 
82
79
  ```bash
83
80
  export GITCODE_ACCESS_TOKEN="your-token"
84
81
  ```
85
82
 
86
- If your token is stored in encrypted form, pass `decrypt=` to decode either an
87
- encrypted `api_key=` value or an encrypted `GITCODE_ACCESS_TOKEN` value before
83
+ If your token is stored in encrypted form, pass `decrypt` to decode either an
84
+ encrypted `api_key` value or an encrypted `GITCODE_ACCESS_TOKEN` value before
88
85
  the client uses it.
89
86
 
90
87
  ```python
@@ -171,7 +168,7 @@ meta = as_dict(repo) # dict
171
168
 
172
169
  ### Context managers
173
170
 
174
- `GitCode` and `AsyncGitCode` (and the lower-level `SyncAPIClient` / `AsyncAPIClient`) support `with` / `async with`. Leaving the block calls `close()` / `await close()` on the underlying client automatically, including a custom `http_client=` you passed in. `close()` also clears the LRU cache used by each resource group's `method_signature(...)` helper (see the [Available Resources](#available-resources) section).
171
+ `GitCode` and `AsyncGitCode` (and the lower-level `SyncAPIClient` / `AsyncAPIClient`) support `with` / `async with`. Leaving the block calls `close()` / `await close()` on the underlying client automatically, including a custom `http_client` you passed in. `close()` also clears the LRU cache used by each resource group's `method_signature(...)` helper (see the [Available Resources](#available-resources) section).
175
172
 
176
173
  ```python
177
174
  from gitcode_api import GitCode
@@ -328,7 +325,7 @@ while True:
328
325
  pip install 'gitcode-api[mcp]'
329
326
  ```
330
327
 
331
- - **`create_mcp_server`** — builds a `FastMCP` instance with `gitcode_api_tool` already registered; optional `name=`, `tool=`, and extra keyword arguments are forwarded to `FastMCP(...)`.
328
+ - **`create_mcp_server`** — builds a `FastMCP` instance with `gitcode_api_tool` already registered; optional `name`, `tool`, and extra keyword arguments are forwarded to `FastMCP(...)`.
332
329
  - **`GitCodeMCP`** — thin wrapper that constructs that server and registers the tool; unknown attributes are delegated to the underlying `FastMCP` object (for example transport helpers exposed by your FastMCP version).
333
330
  - **`create_mcp_gitcode_api_tool`** — returns the standalone async callable used as the tool body (for custom wiring).
334
331
  - **`register_mcp_gitcode_api_tool`** — attaches that callable to an existing FastMCP-compatible object (`mcp.tool(...)` or `mcp.add_tool(...)`).
@@ -342,7 +339,7 @@ mcp = create_mcp_server(name="GitCode API", owner="SushiNinja", repo="GitCode-AP
342
339
 
343
340
  The same server is available from the CLI as `gitcode-api serve` (see the [CLI](#cli) section).
344
341
 
345
- To share auth or clients across tools, build `GitCodeLLMTool` once (`from gitcode_api.llm._tool import GitCodeLLMTool`) and pass it as `tool=` into `GitCodeMCP`, `create_mcp_server`, `register_mcp_gitcode_api_tool`, or `create_mcp_gitcode_api_tool`.
342
+ To share auth or clients across tools, build `GitCodeLLMTool` once (`from gitcode_api.llm._tool import GitCodeLLMTool`) and pass it as `tool` into `GitCodeMCP`, `create_mcp_server`, `register_mcp_gitcode_api_tool`, or `create_mcp_gitcode_api_tool`.
346
343
 
347
344
  ### openJiuwen (`LocalFunction`)
348
345
 
@@ -360,7 +357,7 @@ jiuwen_tool = create_openjiuwen_gitcode_api_tool(owner="SushiNinja", repo="GitCo
360
357
  # await jiuwen_tool.invoke({"op_type": "repos", "action": "get", "params": {}})
361
358
  ```
362
359
 
363
- Optional `name=` and `description=` override the default tool card. Constructor options otherwise mirror `GitCode` / `AsyncGitCode` (`client=`, `async_client=`, `api_key=`, `owner=`, `repo=`, `base_url=`, `timeout=`, `decrypt=`).
360
+ Optional `name` and `description` override the default tool card. Constructor options otherwise mirror `GitCode` / `AsyncGitCode` (`client`, `async_client`, `api_key`, `owner`, `repo`, `base_url`, `timeout`, `decrypt`).
364
361
 
365
362
  **Claude Desktop (MCPB):** published GitHub Releases include a `gitcode-<version>.mcpb` bundle for one-click installation as a Claude Desktop extension; see Anthropic’s guide, [Build a desktop extension with MCPB](https://claude.com/docs/connectors/building/mcpb). From a checkout you can run `make mcpb` (requires the [`@anthropic-ai/mcpb`](https://www.npmjs.com/package/@anthropic-ai/mcpb) CLI on your `PATH`).
366
363
 
@@ -431,7 +428,7 @@ with GitCode(
431
428
 
432
429
  Use `httpx.AsyncClient(verify=...)` with `AsyncGitCode` for async code.
433
430
 
434
- The OpenAI tool (`GitCodeOpenAITool`), MCP helpers, and `create_openjiuwen_gitcode_api_tool` accept the same `client=` / `async_client=` arguments (OpenAI and MCP also accept a shared `GitCodeLLMTool` via `tool=`). Build `GitCode` / `AsyncGitCode` with your custom `http_client` once and pass it through so LLM tool calls reuse the same TLS settings.
431
+ The OpenAI tool (`GitCodeOpenAITool`), MCP helpers, and `create_openjiuwen_gitcode_api_tool` accept the same `client` / `async_client` arguments (OpenAI and MCP also accept a shared `GitCodeLLMTool` via `tool`). Build `GitCode` / `AsyncGitCode` with your custom `http_client` once and pass it through so LLM tool calls reuse the same TLS settings.
435
432
 
436
433
  ## Project Status
437
434
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gitcode-api"
3
- version = "1.3.0"
3
+ version = "1.3.1"
4
4
  description = "Easy to use Python SDK for the GitCode REST API. Providing builtin CLI tool, and optional LLM integration (MCP, OpenAI tool, and openJiuwen tool) for agents. Community-maintained."
5
5
  keywords = [
6
6
  "gitcode", "git", "devops", "api", "sdk", "python", "httpx", "client",
@@ -10,20 +10,20 @@ readme = "README.md"
10
10
  requires-python = ">=3.9,<4"
11
11
  license = "MIT"
12
12
  authors = [
13
- {name = "Hugo Huang", email = "hugo@hugohuang.com"}
13
+ {name = "Hugo (Jin Huang)", email = "hugo@hugohuang.com"}
14
14
  ]
15
15
  classifiers = [
16
- 'Development Status :: 4 - Beta',
17
- 'Programming Language :: Python',
18
- 'Programming Language :: Python :: Implementation :: CPython',
19
- 'Programming Language :: Python :: 3',
20
- 'Programming Language :: Python :: 3 :: Only',
21
- 'Programming Language :: Python :: 3.9',
22
- 'Programming Language :: Python :: 3.10',
23
- 'Programming Language :: Python :: 3.11',
24
- 'Programming Language :: Python :: 3.12',
25
- 'Programming Language :: Python :: 3.13',
26
- 'Programming Language :: Python :: 3.14',
16
+ "Development Status :: 5 - Production/Stable",
17
+ "Programming Language :: Python",
18
+ "Programming Language :: Python :: Implementation :: CPython",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ "Programming Language :: Python :: 3.14",
27
27
  "Topic :: Software Development :: Version Control :: Git",
28
28
  "Topic :: Scientific/Engineering :: Artificial Intelligence",
29
29
  "Intended Audience :: Developers",
@@ -47,10 +47,12 @@ test = [
47
47
  # Documentation (Sphinx + mirroring upstream GitCode Help pages)
48
48
  docs = [
49
49
  { include-group = "mcp" },
50
- "sphinx",
51
- "sphinx-rtd-theme",
52
50
  "beautifulsoup4",
53
- "myst-parser>=3.0.1,<4",
51
+ "sphinx>=5",
52
+ "sphinx-rtd-theme>=3.0",
53
+ "sphinx-copybutton",
54
+ "myst-parser>=3.0.1",
55
+ "gitcode-api[mcp]",
54
56
  ]
55
57
 
56
58
  # Formatting
@@ -66,7 +68,7 @@ binary = [
66
68
 
67
69
  # FastMCP
68
70
  mcp = [
69
- "fastmcp; python_version >= '3.10'",
71
+ "gitcode-api[mcp]",
70
72
  ]
71
73
 
72
74
  dev = [
@@ -91,7 +93,7 @@ Author = "https://hugohuang.com"
91
93
  gitcode-api = "gitcode_api.cli:main"
92
94
 
93
95
  [tool.uv]
94
- default-groups = ['dev']
96
+ default-groups = ["dev"]
95
97
 
96
98
  [tool.setuptools.package-data]
97
99
  gitcode_api = ["version.txt", "py.typed"]
@@ -1 +0,0 @@
1
- 1.3.0
File without changes
File without changes