Companion code for the article Token-Based Rate Limiting for LLM and AI Agent APIs on restfulapi.net. Tested on 2026-10-02 with Python 3.11, Redis 7.0.15 and the ...