structlog Overview structlog adds structured, context-rich logging to Python. Instead of format strings, you pass key-value pairs that render as JSON (production) or colorized human-readable output (development). Bound loggers carry context across function calls. Instructions Step 1: Configuration Step 2: Usage Step 3: Request Context Guidelines - Use for request-scoped context — all logs in the request include requestId, userId. - JSON output in production, pretty console in development — same code, different renderer. - Bind context early ( ) and it carries through all subsequent log calls.…