Rook
raw JSON → 0.1.209 verified Fri May 01 auth: no python
Rook is a Python package for on-the-fly debugging and data extraction in production. It allows you to run ad-hoc Python scripts, inspect live variables, and modify behavior without redeploying. Current version: 0.1.209. Release cadence is frequent (multiple versions per week).
pip install rook Common errors
error ModuleNotFoundError: No module named 'rook' ↓
cause rook not installed or installed in wrong environment.
fix
Run 'pip install rook' and ensure you are using the same Python environment.
error rook.exceptions.RookConnectionError: Failed to connect to Rook server ↓
cause Rook agent not running or incorrect host/port configuration.
fix
Check that the Rook agent is running on the target host and that the client is configured with the correct endpoint.
Warnings
gotcha Rook requires the target application to be running with the Rook agent enabled. Without the agent, RookClient cannot connect. ↓
fix Ensure the Rook agent is installed and running in your production environment.
gotcha The API key used in RookClient must match the key configured on the target application. Mismatched keys cause silent failures. ↓
fix Verify that ROOK_API_KEY environment variable is set correctly on both client and server.
Imports
- RookClient
from rook import RookClient - start_rook wrong
from rook.client import start_rookcorrectfrom rook import start_rook
Quickstart
from rook import RookClient
client = RookClient(api_key=os.environ.get('ROOK_API_KEY', ''))
# Use client to query and execute scripts on remote service