Quickstart for debugging Sanic
A sample application for debugging Python Sanic apps using Rookout.
Before following this guide we recommend reading the basic Python + Rookout guide.
Running Sanic Server with Rookout
- Clone and install dependencies:
git clone https://github.com/Rookout/deployment-examples.git cd deployment-examples/python-sonic pip3 install -r requirements.txt
- Export organization token:
export ROOKOUT_TOKEN=<Your Rookout Token>
- Run the sanic server:
#start the server (default: http://localhost:5000) python3 sanic_rookout.py
- Have fun debugging: Go to https://app.rookout.com and start debugging :)
Rookout Integration explained
- When running number of workers that handle requests in parallel, we need to import rook for each process.
async def load_rookout(): from rook import auto_start