PaperLite
English | 简体中文
PaperLite is a high-volume downloader for PDFs and web pages served behind bot-protection layers such as Cloudflare. It drives real browsers through rotating short-lived proxies, keeps every task in a PostgreSQL queue shared by one or many machines, and resumes cleanly after interruption.
- One config file, one batch. URLs from any number of hosts go into one queue and run together.
- Real browsers by default. Each worker owns one browser and one IP, passes the challenge once, then downloads continuously, following redirects and saving PDFs or full HTML pages.
- Resumable.
Ctrl+Creturns in-flight tasks to the queue; running the same command again picks up where it stopped. - One machine or many. Every machine pointing at the same PostgreSQL batch takes chunks of work with a lease; add or remove machines at any time.
- Self-protecting. Proxy health checks, IP rotation on mid-lease failure, a circuit breaker for exhausted proxy quotas, and heuristics that skip dead or duplicate content.
- Observable. Per-task error classes and metrics in PostgreSQL, plus an optional fleet dashboard.
Installation
pip install paperlite # or: uv tool install paperlite
Requires Python 3.11+ on Linux or macOS, a PostgreSQL server, and a short-lived proxy extraction API (use --no-proxy to try it locally without one).
No PostgreSQL yet? Start one locally:
docker run -d --name paperlite-pg -e POSTGRES_USER=paperlite -e POSTGRES_PASSWORD=pl \
-e POSTGRES_DB=paperlite -p 5432:5432 postgres:16
Quick start
mkdir work && cd work
paperlite init # writes ./config.toml (mode 600)
Fill in the sections that matter:
[pg]
dsn = "postgresql://paperlite:pl@127.0.0.1:5432/paperlite"
batch = "my-batch" # machines with the same dsn + batch share the work
[proxy]
api_url = "https://proxy.example.com/extract?..." # returns a fresh ip:port per call
username = "..."
password = "..."
[paths]
storage = "output" # where PDFs / HTML pages go
[run]
command = "run"
workers = 20
urls = "urls.csv" # one URL per line, or a CSV with a `url` column
Then run the batch:
paperlite run config.toml # imports, downloads, exits when the queue is empty
# run the same command on more machines to go faster
paperlite status # counts by status and error class
See the Getting started guide for a full walkthrough.
Documentation
The guides under
docs/are written in Chinese; the README and Getting started are bilingual.
| I want to… | Read |
|---|---|
| Run my first batch | Getting started |
| Choose between browser and curl mode | Execution modes |
| Deploy PostgreSQL | PostgreSQL |
| Run one batch on many machines | Multi-machine deployment |
| Resume, retry, export, run in the background | Operations |
| Set up the fleet dashboard | Monitoring |
| Get Cloudflare Turnstile tokens | Turnstile |
| Fix a problem | Troubleshooting |
| Look up a config field | Configuration reference |
| Look up a command | CLI reference |
| Query the task database | Task database |
| Understand why it works this way | Architecture & design notes |
| Contribute | CONTRIBUTING · Changelog |
The full index is at docs/.
License
Metadata
Release files for paperlite 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| paperlite-0.4.0.tar.gz | 228.3 kB | With provenance | Details for paperlite-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| paperlite-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for paperlite-0.4.0-py3-none-any.whl |
Total release size: 382.5 kB
Release files / paperlite-0.4.0.tar.gz
| Download URL | paperlite-0.4.0.tar.gz |
|---|---|
| Size | 228.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6c694d26d5c7972ec23b4a492093832cd2ad62617e3a845e8b7c1ccf6bfdfde
|
|
BLAKE2b-256 checksum How to use checksums |
6d966ce5a9acffc9fde35dfc0f5e44e64e6f8374f8e95ef8775aa5b560212b39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logRelease files / paperlite-0.4.0-py3-none-any.whl
| Download URL | paperlite-0.4.0-py3-none-any.whl |
|---|---|
| Size | 154.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bdf9bc86145ddeaddfbc3cc45408368989df76ecf10c6eb1bf951af114d4dda1
|
|
BLAKE2b-256 checksum How to use checksums |
9eb112ae76d3071059148dad2ad8a67bddea145fc56bd6d2fed28100da380f52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logSecurity for paperlite 0.4.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for paperlite-0.4.0.tar.gz
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 Nov 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.