Registry / devops / shub
library2.18.0pypypi✓ verified 84d ago

shub is the official command-line client for Scrapinghub, enabling users to deploy, schedule, and manage Scrapy spiders on the Scrapinghub cloud platform. Current version: 2.17.1. Release cadence is irregular.

pip install shub
INSTALL
IMPORT
SIG · SHUB
S
shub
devopspythonv2.18.0
Install
3.3s avg
Import
Disk
31MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.18.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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 27.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.3s · import 0.000s · 29MB
31MB installed
● package 31MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

shub
import shub

Basic usage: login with API key and list projects.

import shub import os # Login using API key from environment variable api_key = os.environ.get('SHUB_APIKEY', '') if not api_key: raise Exception("Please set SHUB_APIKEY environment variable") shub.login(api_key) # List all projects projects = shub.projects.list() print("Projects:", projects) # Deploy a spider (run from project directory) # shub.deploy(project_id, target='prod')
shub --version
Debug
Known issues
gotchashub requires Python 3.10+. Older Python versions are no longer supported.
fix
Upgrade Python to 3.10 or later.
affects: >=2.17.0
deprecatedThe old shub deploy command using a YAML config file with a 'project' field is deprecated in favor of using the project ID directly. The 'project' field may be removed in future versions.
fix
Use the numeric project ID in your config or command line instead of the project name.
affects: >=2.14.0
gotchaAPI key authentication via environment variable SHUB_APIKEY is the recommended method. Using the interactive login command in automated scripts will cause failures.
fix
Set SHUB_APIKEY environment variable and call shub.login(api_key) programmatically.
affects: all
Errors
Common errors & fixes
shub: error: argument command: invalid choice: 'deploy'
Typo or old command syntax. The correct subcommand is 'deploy' but sometimes used incorrectly with extra arguments.
fix
Use correct syntax: shub deploy [project-id] [--target]
shub.exceptions.ShubException: Invalid API key
API key is missing or incorrect. Not set in environment or passed incorrectly.
fix
Set SHUB_APIKEY environment variable or pass key via shub.login(api_key) with a valid key.
Upgrade
Version history
2.18.0latest on PyPI · released Jun 19, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
shub — pip install shub · libregistry