# 配置镜像源
> 快速设置国内镜像源,方便记不住源地址的小伙子
## 安装
```shell
pip install mirror-source
```
## 使用
```shell
python -m mirror_source
```
```shell
请选择要设置的镜像源
[0] [清华](https://pypi.tuna.tsinghua.edu.cn/simple)
[1] [阿里云](https://mirrors.aliyun.com/pypi/simple/)
[2] [网易](https://mirrors.163.com/pypi/simple/)
[3] [豆瓣](https://pypi.douban.com/simple/)
[4] [百度云](https://mirror.baidu.com/pypi/simple/)
[5] [华为云](https://mirrors.huaweicloud.com/repository/pypi/simple/)
[6] [腾讯云](https://mirrors.cloud.tencent.com/pypi/simple/)
[Default:0]> 1
:) Success setting source: https://mirrors.aliyun.com/pypi/simple/
```
## 功能介绍
- Windows 环境配置`%APPDATA%/pip/pip.ini`
```ini
[global]
index-url = 镜像源URL
[install]
trusted-host = 镜像源域名
```
- Linux/Mac 环境配置`~/.pip/pip.conf`
```ini
[global]
index-url = 镜像源URL
[install]
trusted-host = 镜像源域名
```
- pipenv 环境配置`.Pipfile`
```toml
[[source]]
url = "镜像源URL"
verify_ssl = true
name = "镜像源域名"
```
- poetry 环境配置`pyproject.toml`
```toml
[[tool.poetry.source]]
name = "镜像源域名"
url = "镜像源URL"
default = true
```
Raw data
{
"_id": null,
"home_page": "https://github.com/hbh112233abc/mirror-source",
"name": "mirror-source",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<3.13",
"maintainer_email": "",
"keywords": "pip,mirror",
"author": "hbh112233abc",
"author_email": "hbh112233abc@163.com",
"download_url": "https://files.pythonhosted.org/packages/ad/b3/044db674e401eaaa5eddee2c916b1eec0e1b0b02348b63f0466e8ecdeae7/mirror_source-0.0.9.tar.gz",
"platform": null,
"description": "# \u914d\u7f6e\u955c\u50cf\u6e90\n\n> \u5feb\u901f\u8bbe\u7f6e\u56fd\u5185\u955c\u50cf\u6e90,\u65b9\u4fbf\u8bb0\u4e0d\u4f4f\u6e90\u5730\u5740\u7684\u5c0f\u4f19\u5b50\n\n## \u5b89\u88c5\n\n```shell\npip install mirror-source\n```\n\n## \u4f7f\u7528\n\n```shell\npython -m mirror_source\n```\n\n```shell\n\n\u8bf7\u9009\u62e9\u8981\u8bbe\u7f6e\u7684\u955c\u50cf\u6e90\n\n [0] [\u6e05\u534e](https://pypi.tuna.tsinghua.edu.cn/simple)\n\n [1] [\u963f\u91cc\u4e91](https://mirrors.aliyun.com/pypi/simple/)\n\n [2] [\u7f51\u6613](https://mirrors.163.com/pypi/simple/)\n\n [3] [\u8c46\u74e3](https://pypi.douban.com/simple/)\n\n [4] [\u767e\u5ea6\u4e91](https://mirror.baidu.com/pypi/simple/)\n\n [5] [\u534e\u4e3a\u4e91](https://mirrors.huaweicloud.com/repository/pypi/simple/)\n\n [6] [\u817e\u8baf\u4e91](https://mirrors.cloud.tencent.com/pypi/simple/)\n\n[Default:0]> 1\n:) Success setting source: https://mirrors.aliyun.com/pypi/simple/\n```\n\n## \u529f\u80fd\u4ecb\u7ecd\n\n- Windows \u73af\u5883\u914d\u7f6e`%APPDATA%/pip/pip.ini`\n\n ```ini\n [global]\n index-url = \u955c\u50cf\u6e90URL\n [install]\n trusted-host = \u955c\u50cf\u6e90\u57df\u540d\n ```\n\n- Linux/Mac \u73af\u5883\u914d\u7f6e`~/.pip/pip.conf`\n\n ```ini\n [global]\n index-url = \u955c\u50cf\u6e90URL\n [install]\n trusted-host = \u955c\u50cf\u6e90\u57df\u540d\n ```\n\n- pipenv \u73af\u5883\u914d\u7f6e`.Pipfile`\n\n ```toml\n [[source]]\n url = \"\u955c\u50cf\u6e90URL\"\n verify_ssl = true\n name = \"\u955c\u50cf\u6e90\u57df\u540d\"\n ```\n\n- poetry \u73af\u5883\u914d\u7f6e`pyproject.toml`\n\n ```toml\n [[tool.poetry.source]]\n name = \"\u955c\u50cf\u6e90\u57df\u540d\"\n url = \"\u955c\u50cf\u6e90URL\"\n default = true\n ```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "\u5feb\u901f\u8bbe\u7f6e\u56fd\u5185\u955c\u50cf\u6e90,\u65b9\u4fbf\u8bb0\u4e0d\u4f4f\u6e90\u5730\u5740\u7684\u5c0f\u4f19\u5b50",
"version": "0.0.9",
"project_urls": {
"Documentation": "https://github.com/hbh112233abc/mirror-source",
"Homepage": "https://github.com/hbh112233abc/mirror-source",
"Repository": "https://github.com/hbh112233abc/mirror-source"
},
"split_keywords": [
"pip",
"mirror"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dccd4ab5d9e8ec3c33add1a9e6ee2188509101a5fcbc5abc50825f01d6b873e8",
"md5": "eff71fc11a32c421af959b0cd8b07962",
"sha256": "df344ce4d41d4125ed2d94c7757fed80b6e32154daaba051dd7f7a898c3f5be3"
},
"downloads": -1,
"filename": "mirror_source-0.0.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "eff71fc11a32c421af959b0cd8b07962",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<3.13",
"size": 5375,
"upload_time": "2023-08-24T05:39:11",
"upload_time_iso_8601": "2023-08-24T05:39:11.676003Z",
"url": "https://files.pythonhosted.org/packages/dc/cd/4ab5d9e8ec3c33add1a9e6ee2188509101a5fcbc5abc50825f01d6b873e8/mirror_source-0.0.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "adb3044db674e401eaaa5eddee2c916b1eec0e1b0b02348b63f0466e8ecdeae7",
"md5": "60409e327266dff9d08e63cfab3afe1d",
"sha256": "ee600df8a620c35478739ef9c489ac159f7ae8e91d70091959cbea3656c810c4"
},
"downloads": -1,
"filename": "mirror_source-0.0.9.tar.gz",
"has_sig": false,
"md5_digest": "60409e327266dff9d08e63cfab3afe1d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<3.13",
"size": 4901,
"upload_time": "2023-08-24T05:39:12",
"upload_time_iso_8601": "2023-08-24T05:39:12.736279Z",
"url": "https://files.pythonhosted.org/packages/ad/b3/044db674e401eaaa5eddee2c916b1eec0e1b0b02348b63f0466e8ecdeae7/mirror_source-0.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-24 05:39:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hbh112233abc",
"github_project": "mirror-source",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mirror-source"
}