Installation
Pry runs on Python 3.11+ with FastAPI, Playwright, FlareSolverr, Redis, and httpx under the hood. There are three ways to install it.
:::note PyPI name
The PyPI name pry is already taken — install the package as pry-scraper
directly from the repository.
:::
Option 1: pip (bare metal)
Install from the repository (Codeberg mirror shown):
# Editable install from a local clone
git clone https://git.rugmunch.io/RugMunchMedia/pryscraper.git
cd pryscraper
pip install -e .
# OR install directly from the remote
pip install "pry-scraper @ git+https://codeberg.org/cryptorugmunch/pryscraper.git"
Install the Playwright browser runtime (required for full browser features):
playwright install chromium
Start the server:
pry serve
# API listens on http://localhost:8002 (configurable via PRY_HOST / PRY_PORT)
Optional but recommended for Cloudflare bypass — run FlareSolverr as a sidecar:
docker run -d -p 8192:8191 ghcr.io/flaresolverr/flaresolverr
Option 2: Docker (recommended)
Use the bundled docker-compose.yml — it wires up Pry, FlareSolverr, and an
optional Tor container with health checks, restart policies, and resource
limits out of the box.
git clone https://git.rugmunch.io/RugMunchMedia/pryscraper.git
cd pryscraper
cp .env.example .env # optional for local use
docker compose up -d
- Pry API: host
127.0.0.1:8005→ container8002 - FlareSolverr: host
127.0.0.1:8192→ container8191 - Tor (profile
toronly): host127.0.0.1:9050/9051→ container9050/9051
See Docker Compose for the full reference.
Option 3: from source (development)
For development, use the Makefile targets:
make install # Install with dev dependencies
make dev # Start the hot-reload server
Quality gates:
make lint # ruff check
make format # ruff format
make typecheck # mypy
make test # pytest
make check # Full audit (lint + typecheck + test)
make security # bandit + safety
Post-install verification
# Health endpoint
curl http://localhost:8002/health
# If you set PRY_API_KEY, remember to send the Bearer token:
curl -H "Authorization: Bearer <key>" http://localhost:8002/health
CLI reference
| Command | Description |
|---|---|
pry open <url> | Scrape URL to clean markdown |
pry watch <url> | Monitor page for changes |
pry crawl <url> | Crawl multiple pages |
pry batch <file> | Batch scrape URLs from file |
pry parse <url> | Parse PDF/DOCX/image |
pry ss <url> | Take screenshot |
pry run [pry.yml] | Execute a job file |
pry serve | Start the API server |
pry mcp serve | Start the MCP server (stdio transport) |
pry completions [bash|zsh|fish] | Print shell-autocomplete install instructions |
Common CLI options:
| Flag | Applies to | Description |
|---|---|---|
--json | open | Output as JSON |
--schema <file> | open | JSON schema file for extraction |
--timeout <sec> | open | Request timeout |
--webhook <url> | watch | Webhook URL for change notifications |
--max-pages <n> | crawl | Maximum pages to crawl |
--template <json> | batch | Extraction template as JSON string |
-o <file> | crawl, ss | Output file path |
--port <n> | serve | Server port (default: 8002) |
Next steps
- Quickstart — first scrape in five minutes
- Docker Compose — full compose reference
- Configuration — every environment variable