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
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.
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.

Initialize RookClient with an API key. Then use the client to remotely debug or extract data from a running Python application.

from rook import RookClient

client = RookClient(api_key=os.environ.get('ROOK_API_KEY', ''))
# Use client to query and execute scripts on remote service