Stable ownership
SHA-256 assignment keeps a URL or canonical work key on one shard across restarts and machines.
Python package · crawler coordination
A small library for stable shard assignment, SQLite leases, retries, and worker launch coordination. It can be used with an existing Scrapy or Python crawler without adopting the rest of the HexDigest stack.
SHA-256 assignment keeps a URL or canonical work key on one shard across restarts and machines.
SQLiteWorkStore atomically claims pending work, recovers expired leases, and records retries and failures.
hexdigest-shard run starts workers without a shell, assigns shard and proxy environment, and preserves readable logs.
pip install hexdigest-crawl-sharding
from hexdigest_crawl_sharding import ShardSpec
spec = ShardSpec(index=2, count=8)
if spec.owns("https://example.com/products/123"):
fetch_product("https://example.com/products/123")The package also includes a compatibility helper for legacy row-id or sitemap-position assignment when migrating an existing crawl.
The package contains shard assignment, lease state, retry bookkeeping, and worker launch helpers extracted from HexDigest. Product extractors, marketplace adapters, and proprietary data remain separate.