limits icon indicating copy to clipboard operation
limits copied to clipboard

Rate limiting using various strategies and storage backends such as redis & memcached

Results 30 limits issues
Sort by recently updated
recently updated
newest added

Redis-py has has async support for a while, it would be cleaner to use the same library.

I have such test code: storage = storage_from_string('memory://') limiter = limits.strategies.FixedWindowElasticExpiryRateLimiter(storage) rate = limits.parse('2/6second') while 1: print(limiter.hit(rate, '111')) time.sleep(5) and I got > True > True > False > False...

Is the library thread-safe? Docs don't mention, but I would _assume_ it is, because it's being used in contexts that are normally multi-threaded (e.g. `Flask-Limiter`). However, when I was using...

Would it be useful to have a file system backend? I currently run a flask app on Apache, which spins up a pool of 7-30 processes to respond to requests....

enhancement

Bumps [furo](https://github.com/pradyunsg/furo) from 2023.9.10 to 2024.1.29. Changelog Sourced from furo's changelog. Changelog 2024.01.29 -- Amazing Amethyst Fix canonical url when building with dirhtml. Relicense the demo module. 2023.09.10 -- Zesty...

dependencies

Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.21.1 to 0.23.4. Release notes Sourced from pytest-asyncio's releases. pytest-asyncio 0.23.4 0.23.4 (2024-01-28) pytest-asyncio no longer imports additional, unrelated packages during test collection #729 Addresses further issues...

dependencies

We have encountered some errors with the Redis instances we use `limits` with, and `limits` bubbles those exceptions up. This is not bad on its own, but we are having...

Bumps [sphinxext-opengraph](https://github.com/wpilibsuite/sphinxext-opengraph) from 0.9.0 to 0.9.1. Release notes Sourced from sphinxext-opengraph's releases. v0.9.1 What's Changed Test Sphinx 7 by @​hugovk in wpilibsuite/sphinxext-opengraph#114 Fix default Roboto font not being found by...

dependencies

Fixed window strategy using mongodb storage not working. The expireAt always use moving window strategy. ``` def incr( self, key: str, expiry: int, elastic_expiry: bool = False, amount: int =...

question

https://github.com/alisaifee/limits/blob/0946fdcd3b9509041a823d3bb1b63ea1de9ab6ee/limits/util.py#L36-L44 ## Expected Behaviour Currently, `WindowStats` class contains information about reset time and remaining amount. Could we add the time remaining until the reset? This would be useful in some...

enhancement