Installation
Installing bitmapist is straightforward using your favorite Python package manager.
Prerequisites
- Python: Version 3.9 or newer.
- Redis: Version 2.6 or newer.
You must have a running Redis server that your application can connect to.
Install with pip
To install the latest stable version from PyPI using pip, run:
pip install bitmapist
Install with uv
If you are using uv, you can add bitmapist to your project with:
uv add bitmapist
Dependencies
Bitmapist has the following core dependencies, which will be installed automatically:
redis>=2.10,<6.0python-dateutilMako>=1.0.4,<2
Connecting to Redis
Once installed, you need to configure bitmapist to connect to your Redis instance. You can do this by calling setup_redis at the start of your application.
from bitmapist import setup_redis
# Connect to Redis on localhost, port 6379, db 0
setup_redis("default", "localhost", 6379, db=0)
# You can also set up multiple connections
setup_redis("analytics", "redis.example.com", 6379, db=1)
Now you are ready to start tracking events. Head over to the Quick Start guide for a hands-on example.