INNER CODE UNIT · Python
incr
alisaifee/limits · limits/aio/storage/redis/__init__.py:154
async def incr(self, key: str, expiry: int, amount: int = 1) -> int:
"""
increments the counter for a given rate limit key
:param key: the key to increment
:param expiry: amount in seconds for the key to expire in
:param amount: the number to increment by
"""
return await self.bridge.incr(key, expiry, amount)
async def get(self, key: str) -> int:
"""
:param key: the key to get the counter value for
"""
return await self.bridge.get(key)