Installation#
Install the package with pip:
$ pip install limits
$ pip install limits[redis]
Includes
redis>3,!=4.5.2,!=4.5.3,<5.0.0
$ pip install limits[rediscluster]
Includes
redis>=4.2.0,!=4.5.2,!=4.5.3
$ pip install limits[memcached]
Includes
pymemcache>3,<5.0.0
$ pip install limits[mongodb]
Includes:
pymongo>4.1,<5
$ pip install limits[etcd]
Includes:
etcd3
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>=3.4.0,<5;python_version>"3.7"
$ pip install limits[async-memcached]
Includes:
emcache>=0.6.1;python_version<"3.11" # not yet supported
emcache>=1;python_version>="3.11" # not yet supported
$ pip install limits[async-mongodb]
Includes:
motor>=3,<4
$ pip install limits[async-etcd]
Includes:
aetcd