Installation#

Install the package with pip:

$ pip install limits
$ pip install limits[redis]

Includes

redis>3,<5.0.0
$ pip install limits[rediscluster]

Includes

redis>=4.2.0
$ pip install limits[memcached]

Includes

pymemcache>3,<4.0.0
$ pip install limits[mongodb]

Includes:

pymongo>3,<5

More details around the specifics of each storage backend can be found in Storage Backends

Async Storage#

If you are using an async code base you can install the storage dependencies along with the package using the following extras:

$ pip install limits[async-redis]

Includes:

coredis[hiredis]>=3.4.0,<4;python_version>"3.7"
$ pip install limits[async-memcached]

Includes:

emcache>=0.6.1;python_version<"3.11" # not yet supported
$ pip install limits[async-mongodb]

Includes:

motor>=2.5,<4