Install & Compatibility
Where this runs
tested against v2.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.722s · 21.6MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.2s · import 0.636s · 22MB
20MB installed
● package 20MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ScrapinghubClient
✓ from scrapinghub import ScrapinghubClient
✗ from scrapinghub.client import ScrapinghubClient
Old or incorrect import path. The main class is directly under the package.
Initialize client with API key, fetch a project, and list jobs.
from scrapinghub import ScrapinghubClient
api_key = os.environ.get('SHUB_APIKEY', '')
client = ScrapinghubClient(api_key)
# Access a project
project = client.get_project(123456)
print(project.key)
# List jobs (spiders) in a project
for job in project.jobs.iter():
print(job['key'])
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'hubstorage'
The hubstorage package is deprecated and merged into scrapinghub.
fixpip install scrapinghub and change imports to 'from scrapinghub import ScrapinghubClient'.
ImportError: cannot import name 'ScrapinghubClient' from 'scrapinghub.client'
Incorrect import path; ScrapinghubClient is at the top-level package.
fixfrom scrapinghub import ScrapinghubClient
ScrapinghubError: ('Connection error: ...')
Often due to invalid API key or network issues.
fixVerify SH_APIKEY environment variable is set correctly and that you have internet access.
Upgrade
Version history
2.7.0latest on PyPI · released Apr 7, 2026
Audit
Dependencies
msgpackrequiredserialization of data
requestsrequiredHTTP client
retryingrequiredretry logic for HTTP errors