Skip to content

popoto.redis_limits

popoto.redis_limits

Safety utilities for values crossing the Python-to-Redis/Lua boundary.

Lua's tonumber("None") returns nil and causes crashes. Redis LIMIT clauses expect integers, not float('inf'). This module provides _to_redis_limit() to convert Python unlimited representations to safe bounded integers before they reach Redis.