Python query limiter.