Skip to main content

PyTail

CI Release PyPI Python

pytail is a small PyPI caching proxy. It exposes a Python Simple Repository API endpoint, fetches packages from upstream on demand, and keeps downloaded files in a local cache.

It is useful when you want faster repeated installs, a simple shared package cache, or a local endpoint for PyPI and PyTorch wheel indexes.

Features

  • PyPI-compatible /simple/ endpoint for pip and uv
  • lazy caching of project pages and package files
  • optional cache size limit with least-recently-used cleanup
  • PyTorch wheel index proxy under /pytorch-wheels/
  • HTML and JSON Simple API responses

Install

Install from PyPI:

pip install pytail

Or install from source:

cargo install --path .

Run

After installation:

pytail \
  --bind 127.0.0.1:3141 \
  --cache-dir .cache/pytail

From a source checkout:

cargo run -- \
  --bind 127.0.0.1:3141 \
  --cache-dir .cache/pytail

Then use it as the package index:

uv pip install --index-url http://127.0.0.1:3141/simple/ requests
pip install --index-url http://127.0.0.1:3141/simple/ requests

Open the local index in a browser:

http://127.0.0.1:3141/simple/

PyTorch Wheels

PyTorch wheel indexes are available under /pytorch-wheels/.

For example, this upstream command:

pip install torch --index-url https://download.pytorch.org/whl/cu126

can use the local cache instead:

pip install torch --index-url http://127.0.0.1:3141/pytorch-wheels/cu126

If a package needs both PyTorch wheels and normal PyPI packages:

pip install torch \
  --index-url http://127.0.0.1:3141/pytorch-wheels/cu126 \
  --extra-index-url http://127.0.0.1:3141/simple/

Flat wheel mirrors, such as the Aliyun PyTorch mirror, can be converted into the same project-based Simple API. Start PyTail with the mirror root and enable flat-index mode:

pytail \
  --torch-url https://mirrors.aliyun.com/pytorch-wheels/ \
  --torch-flat-index

Clients continue to use the normal local project index. For example:

pip install torch \
  --index-url http://127.0.0.1:3141/pytorch-wheels/cu128

Options

Common options:

  • --bind: listen address, default 127.0.0.1:3141
  • --cache-dir: cache directory, default .cache/pytail
  • --cache-max-size: max file cache size, default 0 for unlimited; examples: 512MiB, 2G, 10GB
  • --upstream-base-url: PyPI-compatible upstream, default https://pypi.org
  • --torch-url: PyTorch wheel upstream, default https://download.pytorch.org/whl/
  • --torch-flat-index: treat each PyTorch channel URL as a flat --find-links page and expose it as a project-based Simple API
  • --project-cache-ttl-secs: project page refresh interval, default 900
  • --request-timeout-secs: upstream request timeout, default 15
  • --stats-interval-secs: stats log and trend sampling interval, default 3600; set to 0 to disable
  • --verbose: enable operational debug logs; use RUST_LOG=pytail=trace for per-request and cache-hit details

Build

Build the Rust binary:

cargo build --release

Build a Python wheel with maturin:

maturin build --release

The wheel installs the pytail command.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytail-0.1.9.tar.gz (95.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pytail-0.1.9-py3-none-win_amd64.whl (3.7 MB view details)

Uploaded Python 3Windows x86-64

pytail-0.1.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

pytail-0.1.9-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (7.6 MB view details)

Uploaded Python 3macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file pytail-0.1.9.tar.gz.

File metadata

  • Download URL: pytail-0.1.9.tar.gz
  • Upload date:
  • Size: 95.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pytail-0.1.9.tar.gz
Algorithm Hash digest
SHA256 61a829a3fb32ff55d08d6dd378a278ceb26f37026fa996ea8322db1352ccd8f9
MD5 079346c65ddf298b907fc81697b699a1
BLAKE2b-256 1ce8cbfbc1aae08e0bbc3325b4a2e1998f30330c8987301185687c3e17d533e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytail-0.1.9.tar.gz:

Publisher: release.yml on AndPuQing/PyTail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytail-0.1.9-py3-none-win_amd64.whl.

File metadata

  • Download URL: pytail-0.1.9-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pytail-0.1.9-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c047306b1fdf71c8beda7f45bb7f756ccabaf9cd9e67367a9b7501a8c06bf884
MD5 d38f2438a9359d40186426a37f38a15f
BLAKE2b-256 636aa2b4bb0726b3eba363f1bc0e6322c25c72b835393e3c5ccde61bc5b6f516

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytail-0.1.9-py3-none-win_amd64.whl:

Publisher: release.yml on AndPuQing/PyTail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytail-0.1.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pytail-0.1.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 30f0224e3e92216c1345b4155355a54a2162152db67b4d34733bf3431159494c
MD5 cdc4f4defbe050036e2dc678be127d7f
BLAKE2b-256 737a42ad409c8cb78b1f151b5f8412e81082b10dd83802affe78a6a526bd8015

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytail-0.1.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on AndPuQing/PyTail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytail-0.1.9-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for pytail-0.1.9-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 7ad24b2fc694e01da07c13e4127762a840b5ce0fbaf4d598a9b20de95a44b3bc
MD5 930037895ac17038bffbacd8fa104676
BLAKE2b-256 b9e2cddda3c9a0da20781a9f43c54f3678d1ce434a0817104d205793ff63c324

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytail-0.1.9-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on AndPuQing/PyTail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.11

4 files

0.1.10

4 files

This release

0.1.9 This release

4 files

0.1.8

4 files

0.1.7

4 files

0.1.6

4 files

0.1.5

4 files

0.1.4

4 files

0.1.3

4 files

0.1.2

4 files

0.1.1

4 files

0.1.0

4 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page