

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# Python 兼容性
<a name="python-compatibility"></a>

CodeArtifact 不支持 PyPI `XML-RPC` 或`JSON` APIs。

CodeArtifact 支持 PyPI `Legacy` APIs，但 `simple` API 除外。虽然 CodeArtifact 不支持 `/simple/` API 端点，但它支持`/simple/<project>/`终端节点。

有关更多信息，请参阅 Python 打包管理机构 GitHub存储库中的以下内容。
+ [XML-RPC API](https://github.com/pypi/warehouse/blob/main/docs/dev/api-reference/xml-rpc.rst)
+ [JSON API](https://github.com/pypi/warehouse/blob/main/docs/dev/api-reference/json.rst)
+ [Legacy API](https://github.com/pypi/warehouse/blob/main/docs/dev/api-reference/legacy.rst)

## pip 命令支持
<a name="pip-command-support"></a>

以下各节总结了 CodeArtifact 存储库支持的 pip 命令以及不支持的特定命令。

**Topics**
+ [与存储库进行交互的受支持命令](#supported-pip-commands-that-interact-with-a-repository)
+ [支持的客户端命令](#supported-pip-client-side-commands)

### 与存储库进行交互的受支持命令
<a name="supported-pip-commands-that-interact-with-a-repository"></a>

此部分列出了 `pip` 命令，其中 `pip` 客户端向其配置的注册表发出一个或多个请求。这些命令已经过验证，在针对 CodeArtifact 存储库调用时可以正常运行。


****  

| 命令 | 说明 | 
| --- | --- | 
|   [install](https://pip.pypa.io/en/stable/reference/pip_install/)   |  安装程序包。  | 
|   [download](https://pip.pypa.io/en/stable/reference/pip_download/)   |  下载程序包。  | 

CodeArtifact 不实现`pip search`。如果您配置`pip`了 CodeArtifact 存储库，则运行`pip search`将搜索并显示来自 [PyP](https://pypi.org/) I 的包。

### 支持的客户端命令
<a name="supported-pip-client-side-commands"></a>

这些命令不需要与存储库进行任何直接交互，因此 CodeArtifact 无需执行任何操作即可支持它们。


****  

| 命令 | 说明 | 
| --- | --- | 
|   [uninstall](https://pip.pypa.io/en/stable/reference/pip_uninstall/)   |  卸载程序包。  | 
|   [freeze](https://pip.pypa.io/en/stable/reference/pip_freeze/)   |  按要求格式输出已安装的程序包。  | 
|   [list](https://pip.pypa.io/en/stable/reference/pip_list/)   |  列出已安装程序包。  | 
|   [show](https://pip.pypa.io/en/stable/reference/pip_show/)   |  显示有关已安装程序包的信息。  | 
|   [check](https://pip.pypa.io/en/stable/reference/pip_check/)   |  验证已安装的程序包是否具有兼容的依赖项。  | 
|   [config](https://pip.pypa.io/en/stable/reference/pip_config/)   |  管理本地和全局配置。  | 
|   [wheel](https://pip.pypa.io/en/stable/reference/pip_wheel/)   |  根据您的要求构建 wheel。  | 
|   [hash](https://pip.pypa.io/en/stable/reference/pip_hash/)   |  计算程序包存档的哈希值。  | 
|   [completion](https://pip.pypa.io/en/stable/user_guide/#command-completion)   |  协助完成命令。  | 
|   [debug](https://pip.pypa.io/en/stable/reference/pip_debug/)   |  显示对调试有用的信息。  | 
|  help  |  显示命令的帮助。  | 