Skip to main content

MirrorURL

CI Python License: MIT

Security-hardened remote directory mirroring tool. MirrorURL recursively discovers files behind an HTTP(S) directory listing and mirrors them locally with adaptive concurrency, resumable/partial downloads, integrity verification, and an SSRF-hardened transport layer.

Features

  • Recursive discovery of remote directory trees (BFS, depth/exclude limits, cycle-safe).
  • True parallel downloads — multiple files and multiple chunks per file concurrently.
  • Adaptive async concurrency that tunes itself to server RTT, throughput, and error rate.
  • Resumable & partial downloads with HTTP range requests and chunk assembly.
  • Integrity checks — size/timestamp comparison, ETag handling, content hashing.
  • Resilience — per-domain circuit breakers, exponential backoff, rate limiting.
  • Security — path-traversal and symlink-bomb defenses, private-IP/SSRF guards, URL-scope enforcement.
  • Operability — metrics collection, multi-level progress, optional HTTP health-check server.
  • Caching — directory listings and file metadata; discovery currently keeps the remote file list in memory.

Installation

Python 3.9 or newer is required. Install the published package from PyPI in a virtual environment:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install mirror-url

To include all optional acceleration, progress, and monitoring packages:

python -m pip install "mirror-url[all]"

Upgrade an existing installation:

python -m pip install --upgrade mirror-url

Check the installed package and CLI:

python -m pip check
mirror-url --version
mirror-url --help

Core dependencies: httpx[http2], pydantic (v2), PyYAML. Optional extras: fast (stringzilla, lxml), progress (tqdm), monitor (psutil), and all (all optional runtime packages). Contributor setup is described below.

Usage

Run via the console entry point or the module:

mirror-url --url https://example.com/files/ --dest-path ./mirror --log-path ./mirror-log
# or
python -m mirror_url --url https://example.com/files/ --dest-path ./mirror --log-path ./mirror-log

Run mirror-url --help for the full option list.

Configuration can also be supplied via a YAML file (see MirrorConfig / load_config_from_args).

📖 Full documentation: see the User Guide (HTML version) for detailed installation, CLI reference, config-file format, download modes, security notes, the Python API, and troubleshooting.

🛠 Contributing to the code? The Developer Guide (HTML version) is an architecture deep-dive: dependency layers, the MirrorURL mixin design, runtime data flow, and step-by-step extension recipes.

Development

From a repository checkout, create and activate a virtual environment, then install the editable package with its runtime extras and development tools:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[all,dev]"
pre-commit install

ruff check .                  # lint
ruff format --check .         # format check (Ruff 0.16.8)
mypy                          # type-check the package
pytest -m "not integration"   # fast test lane
pytest                        # full suite (includes integration)

Continuous integration runs lint + tests across Python 3.9–3.12 (see .github/workflows/ci.yml).

Project layout

src/mirror_url/          # the package (dependency-layered)
tests/                   # pytest suite
REFACTORING_PLAN.md      # module breakdown + migration roadmap
CHANGELOG.md             # notable changes (Keep a Changelog format)
CONTRIBUTING.md          # dev setup, checks, conventions
pyproject.toml           # packaging, deps, tool config

Contributing

Contributions are welcome — see CONTRIBUTING.md for the dev setup, the checks CI runs, and the project conventions (dependency layering, lint policy, behavior-preserving refactors). Notable changes are tracked in CHANGELOG.md.

Authors

Borut Podlipnik, Max-Planck-Institute for Solar System Research, podlipnik@mps.mpg.de

License

MIT © BP

Metadata

Release files for mirror-url 3.1.74

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mirror-url 3.1.74
File Size Uploaded
mirror_url-3.1.74.tar.gz 313.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mirror-url 3.1.74
File Interpreter ABI Platform
mirror_url-3.1.74-py3-none-any.whl Python 3 none any Details

Total release size: 524.7 kB

Release files / mirror_url-3.1.74.tar.gz

Download URL mirror_url-3.1.74.tar.gz
Size 313.8 kB
Tags Source
SHA-256 checksum
How to use checksums
201b68cf15d77dba7d60194125b7660ac8953e4f7fa93db4f9aa2ade8043ead9
BLAKE2b-256 checksum
How to use checksums
ab61b1be07f706ce65ab7fdc5aee70afe8deadb748d3fc6b8b4967062ead24f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / mirror_url-3.1.74-py3-none-any.whl

Download URL mirror_url-3.1.74-py3-none-any.whl
Size 211.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aff2934a73faee1ee0b35ee07bd4c6f9e4088f369e9c215d25c82daf0df514b0
BLAKE2b-256 checksum
How to use checksums
644e08e0a7b26acd1c97ccec23a6fdf2c7ff47d3f65900e3b49a8372d0e83ed8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

3.8.4

2 release files

3.8.3

2 release files

3.8.2

2 release files

3.8.1

2 release files

3.8.0

2 release files

3.7.3

2 release files

3.7.2

2 release files

3.7.1

2 release files

3.7.0

2 release files

3.6.0

2 release files

3.5.2

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.6

2 release files

3.4.5

2 release files

3.4.4

2 release files

3.4.3

2 release files

3.4.2

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.4

2 release files

3.3.3

2 release files

3.3.2

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.1

2 release files

3.2.0

2 release files

This release

3.1.74 This release

2 release files

3.1.69

2 release files

3.1.68

2 release files

3.1.67

2 release files

3.1.66

2 release files

3.1.65

2 release files

3.1.64

2 release files

3.1.61

2 release files

3.1.60

2 release files

3.1.59

2 release files

3.1.58

2 release files

3.1.57

2 release files

3.1.56

2 release files

3.1.55

2 release files

3.1.54

2 release files

3.1.53

2 release files

3.1.52

2 release files

3.1.51

2 release files

3.1.45

2 release files

3.1.36

2 release files

3.1.35

2 release files

3.1.34

2 release files

3.1.33

2 release files

3.1.32

2 release files

3.1.31

2 release files

3.1.30

2 release files

3.1.29

2 release files

3.1.28

2 release files

3.1.27

2 release files

3.1.26

2 release files

3.1.25

2 release files

3.1.24

2 release files

3.1.23

2 release files

3.1.22

2 release files

3.1.21

2 release files

3.1.20

2 release files

3.1.19

2 release files

3.1.18

2 release files

3.1.17

2 release files

3.1.14

2 release 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