Bitmapist: A Powerful Analytics Library for Redis

bitmapist

Bitmapist is a Python library that implements powerful, real-time, and highly scalable analytics using Redis's bitmap data structures. It's designed to be easy to use while enabling complex queries on large user bases with minimal memory footprint.

This library makes it possible to answer questions like:

  • Has user 123 been online today? This week? This month?
  • Has user 123 performed action "X"?
  • How many users have been active this month? This hour?
  • How many unique users have performed action "X" this week?
  • What percentage of users active last week are still active this week (retention)?
  • Which specific users performed action "X"?

By leveraging Redis bitmaps, you can store event data for millions of users in just a few megabytes of memory. This approach is exceptionally fast, allowing for real-time analytics dashboards and reports.

Key Features

  • Time-based Events: Automatically track events across different time granularities (hour, day, week, month, year).
  • Bitwise Operations: Perform complex queries by combining event data with AND, OR, XOR, and NOT operations.
  • Cohort Analysis: Generate sophisticated retention analysis and visualize how user behavior changes over time.
  • High Performance: Built on top of Redis, offering blazing-fast read and write operations.
  • Memory Efficient: Uses Redis bitmaps to store vast amounts of data in a compact format.

Ready to get started? Check out the Installation guide and the Quick Start tutorial.

A Note on Bitmapist Server

For even greater memory efficiency (up to 443x improvement), consider using the standalone bitmapist-server. It is fully compatible with this library and can significantly reduce operational costs for large-scale deployments.