Getting started¶
Installation¶
Include browser support to run Pydoll-backed workflows:
Your first workflow¶
Create workflow.yaml:
version: 1
workflow:
name: basic-example
variables:
project: Crawlerflow
output_file: output/hello.txt
steps:
- log:
message: "Starting {{project}}"
- save_text:
path: "{{output_file}}"
content: "{{project|upper}} is running."
Validate it, then run it:
CLI commands¶
| Command | Purpose |
|---|---|
crawlerflow run |
Execute one or more workflows |
crawlerflow validate |
Load and validate workflow files without executing them |
crawlerflow list-steps |
Print every registered step name |
crawlerflow list-plugins |
Print discoverable plugin entry points |
crawlerflow doctor |
Report environment and optional dependency status |
Running multiple workflows¶
Supply more paths to run workflows sequentially. Execution stops at the first failed workflow:
A directory argument discovers its directly contained .yaml and .yml files and runs them in
alphabetical order:
Parallel execution¶
Use asynchronous mode to run every supplied workflow in parallel. All workflows are allowed to
finish; the command exits with code 1 if any workflow fails:
Add --progress to display a live progress bar based on the total workflow count. The bar
advances as each workflow succeeds or fails in both sequential and asynchronous modes:
Use --concurrency (or -c) to limit how many workflows run at the same time in asynchronous
mode. This avoids starting every HTTP client or browser session simultaneously:
Omitting the option preserves unlimited parallel execution. --concurrency accepts positive
integers and can only be used with --mode async.
Enabling a browser¶
Browser-free workflows omit the browser section entirely. Select Pydoll when a real browser is
required:
Applications can also inject another BrowserAdapter into WorkflowRunner. See
HTTP requests for direct HTTP requests and shortened map URL coordinate
resolution.
Development setup¶
git clone https://github.com/mehmetemineker/crawlerflow.git
cd crawlerflow
python -m pip install -e ".[browser,dev]"
pytest
ruff check .
Preview the documentation site locally: