---
title: Redis OM for Python
description: A declarative, async-first object mapper for Redis built on Pydantic v2.
---

<Image
  src="../images/icon.svg"
  alt="REDIS_OM"
  height="100"
/>

Welcome! This is the documentation for redis-om-python.

A declarative, async-first object mapper for Redis built on [Pydantic v2](https://docs.pydantic.dev/),
with support for rich queries via RediSearch, JSON-backed embedded models,
vector similarity search (KNN), bulk operations, atomic counters
(`INCREX`), sparse Redis Arrays, typed Streams wrappers, per-field TTL on
hash models, atomic string CAS/CAD/MULTI-SET, and OpenTelemetry observability.

## Getting Started

- [Getting Started tutorial](/getting_started) — install Redis OM, define a model, save and query data.
- [Examples](/examples) — three full, copy-paste-runnable applications exercising pyredis-om end-to-end.
- [Connecting to Redis](/connections) — URL configuration, clusters, RESP2/RESP3.

## Core features

- [Models and Fields](/models) — `HashModel`, `JsonModel`, `EmbeddedJsonModel`, `Field`, the `Meta` object, and vector fields.
- [Queries and Vector Search](/queries) — expression syntax, dynamic queries, KNN, sort, pagination, cursors.
- [Validation](/validation) — Pydantic-backed validation, strict types, custom validators.
- [Error Messages](/errors) — common errors and how to fix them.

## Operations

- [Bulk Operations](/bulk_operations) — `add()`, `get_many()`, `delete_many()`, pipelines.
- [Streams](/streams) — typed wrapper around the Redis `X*` family with 7.4–8.8 extensions (`XACKDEL`, `XDELEX`, `XNACK`, `IDMP`, `XREADGROUP ... CLAIM`).
- [Geospatial Queries](/geo_queries) — `Coordinates`, `GeoFilter`, GEO + TAG combinations.
- [Hash Field Expiration](/hash_field_ttl) — per-field TTL (`HEXPIRE` family, Redis 7.4+) and atomic field ops (`HGETEX`/`HSETEX`/`HGETDEL`, Redis 8.0+).
- [Pipelines and `execute_command`](/pipelines) — composing model calls with raw Redis commands.
- [Migrations](/migrations) — `Migrator`, the `migrate` CLI, drop/recreate, dry-run, history, cluster mode.

## Redis 8.x features

- [AtomicCounter (`INCREX`)](/atomic_counter) — atomic increment with bounds, saturation, expiration, and `ENX`. Useful for rate limiters and capped counters.
- [Redis Arrays](/redis_arrays) — sparse, index-addressable arrays with ring-buffer, aggregate (`AROP`), and inline grep (`ARGREP`) operations.
- [Atomic Strings (CAS, MSETEX)](/atomic_strings) — `AtomicString` (`SET IFEQ`/`IFNE`, `DELEX`, `DIGEST`) and bulk `MSETEX` (Redis 8.4+).
- [Vector Sets](/vector_sets) — `VectorSet` wrapper over the HNSW-backed `@vectorset` module (`VADD`/`VSIM`/`VINFO`/...) for Redis 8.8+.
- [Hot Keys Tracker](/hotkeys) — `HOTKEYS START/GET/STOP/RESET` server-side top-K sampling for Redis 8.6+.
- [Bitmap Operations](/bitmap_ops) — `BITOP DIFF`/`DIFF1`/`ANDOR`/`ONE` via `BitmapOps` (Redis 8.2+).
- [Sorted Set Aggregations](/sorted_set_aggregations) — `ZUNION`/`ZINTER` with `AGGREGATE COUNT` via `SortedSetOps` (Redis 8.8+).
- [Cluster Admin](/cluster_admin) — `CLUSTER SLOT-STATS` and `CLUSTER MIGRATION` introspection for Redis 8.2+ clusters.
- [Keyspace Notifications](/keyspace_notifications) — constants and helpers for `notify-keyspace-events` (Redis 2.8+).
- [OpenTelemetry Observability](/observability) — opt-in OTel metrics via redis-py 8.0 instrumentation.

## Deployment

- [Redis Cluster](/cluster) — `cluster=True`, cluster-safe bulk writes, and pipelines.
- [Protocol Selection](/protocol) — RESP2 vs RESP3, `protocol_version()`, and protocol-agnostic application code.

## Reference

- [Upstream Issues Fixed in This Fork](/upstream_fixes) — every upstream issue resolved here, with examples.
- [Pending Features (RedisVL)](/redisvl) — advanced RediSearch/Vector features planned for the upcoming RedisVL integration.
- [Pending Features List](/pending_features) — detailed status of features not yet implemented.

## Redis Modules

Read how to get the RediSearch and RedisJSON modules at [Redis Modules](/redis_modules).

## FastAPI Integration

Redis OM is designed to integrate with the FastAPI web framework. See how this
works at [FastAPI Integration](/fastapi_integration).
