**Modern Async Downloader# British Library Tools (bltools)
A modern, asynchronous CLI tool for downloading high-resolution manuscripts from the British Library. Now with full IIIF (International Image Interoperability Framework) support.
- Modern Architecture: Built with Typer, Pydantic (settings & models), and HTTPX.
- IIIF Support: Support for modern IIIF Collection/Manifest URLs.
- Asynchronous: Concurrent downloads with
asyncioandhttpx. - Robust: Automatic retries with exponential backoff via
tenacity. - Rich UI: Interactive progress bars and beautiful logging via
richandstructlog. - 12-Factor Compliant: Configuration via environment variables.
uv tool install bltools
# or run directly
uv run bltools --helppip install .The basic command to download a manuscript:
bltools download add_ms_19352--config, -c: Path to custom config file (default:bl.conf)--output, -o: Override output directory (default: current directory or config setting)--range, -r: Specify a page range (e.g.,1-10)
Download pages 1 to 5 of a manuscript:
bltools download add_ms_19352 --range 1-5Save to a specific directory:
bltools download add_ms_19352 --output ./downloadsYou can use a bl.conf YAML file to set defaults:
sleeptime: 0.0
basedir: "."
rangebegin: 1
rangeend: 259
baseurl: "http://www.bl.uk/manuscripts/Proxy.ashx?view="This project uses hatchling and uv.
- Clone the repo
- Install dependencies:
uv sync - Run tests:
uv run pytest - Lint:
uv run ruff check .