:orphan: .. _install: Installation ============ The library is distributed from PyPI and can be installed using :external+pip:doc:`pip `. .. code-block:: console $ pip install zrq The package has a single dependency to :external+redis:doc:`redis-py - the official Python Redis client `. However, it is heavily recommanded to install ZRQ into a :external+python:mod:`virtualenv `. .. _install-redis: Redis Server ------------ Redis can be installed on wide range of plateforms. It comes with good defaults to be runned in standalone mode out of the box. ZRQ needs at least the release v\ `5.0` which enable the new streaming data structure. .. warning:: The methods described below are solely for development purposes on localhost. For a production grade setup, you must read the official `Redis security `_ guide. High availablity with `Redis Sentinel `_ and scaling to `Redis Cluster `_ are not covered here. Using Docker ^^^^^^^^^^^^ Using Docker Engine (brought by `Docker Desktop `_) are the preferred way to run a Redis instance as it handle the multi-platform support. To install Docker, you may follow the official `Get Docker Desktop `_ guide. .. code-block:: console > Runs a container and bind the default redis port to localhost $ docker run --name redis -dp 127.0.0.1:6379:6379 redis:latest > Stops the container instance $ docker stop redis > Starts a previously stopped container $ docker start redis > Removes a stopped container including his data $ docker rm redis GNU/Linux ^^^^^^^^^ For Debian-like distributions, there is apt. .. code-block:: console $ sudo apt update $ sudo apt install redis > Starts Redis at background $ sudo systemctl start redis From Redis docs: `Install Redis on Linux `_. macOS ^^^^^ For macOS, there is brew. .. code-block:: console $ brew update $ brew install redis > Starts Redis at background $ redis-server --bind 127.0.0.1 From Redis docs: `Install Redis on macOS `_. Windows ^^^^^^^ For Windows, you'll first need to enable WSL2 and use the GNU/Linux apt method. More details can be found on the Redis documentation: `Install Redis on Windows `_. From Source ^^^^^^^^^^^ You nerd. `Check the guide `_ to build Redis from source.