# Python mirror (pkg.shecan.ir)

> Mirror of www.python.org/ftp/python (sources and installers) for pyenv and direct downloads, and of python-build-standalone releases for uv python install.

- Upstream: python.org/ftp, python-build-standalone
- Mirror URLs: <https://mirror-python.pkg.shecan.ir/ftp/python/>, <https://mirror-python.pkg.shecan.ir/standalone/>
- Clients: uv, pyenv, curl
- Service status: <https://pkg.shecan.ir/status.json> (key `python`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/python/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/python.json>
- Integrity comparison with the official source (audit.shecan.ir, also run by Shecan, open source; group `python`, mirror `shecan`): <https://audit.shecan.ir/#python>

## Limitations

- Python packages come from the separate PyPI mirror.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### uv: persistent (user- or system-wide configuration)

Run (linux, macos)

```sh
export UV_PYTHON_INSTALL_MIRROR=https://mirror-python.pkg.shecan.ir/standalone
uv python install 3.13
```

Undo / restore the default (linux, macos)

```sh
unset UV_PYTHON_INSTALL_MIRROR
sed -i.bak -E '/^export (UV_PYTHON_INSTALL_MIRROR)=/d' ~/.bashrc ~/.zshrc ~/.profile 2>/dev/null || true
```

### pyenv: persistent (user- or system-wide configuration)

Run (linux, macos) (checked by hand)

```sh
export PYTHON_BUILD_MIRROR_URL=https://mirror-python.pkg.shecan.ir/ftp/python
export PYTHON_BUILD_MIRROR_URL_SKIP_CHECKSUM=1
pyenv install 3.13
```

Undo / restore the default (linux, macos)

```sh
unset PYTHON_BUILD_MIRROR_URL PYTHON_BUILD_MIRROR_URL_SKIP_CHECKSUM
sed -i.bak -E '/^export (PYTHON_BUILD_MIRROR_URL|PYTHON_BUILD_MIRROR_URL_SKIP_CHECKSUM)=/d' ~/.bashrc ~/.zshrc ~/.profile 2>/dev/null || true
```

### curl: temporary (one command or the current shell; nothing saved)

Run

```sh
curl -fLO https://mirror-python.pkg.shecan.ir/ftp/python/3.14.8/python-3.14.8-amd64.exe
```
