github redis/redis-om-python v1.0.5
Version 1.0.5

4 hours ago

Overview

This is the first stable release of Redis OM Python 1.0. After 9 months of beta testing and 60+ merged PRs, Redis OM Python is now production-ready.

Highlights

  • Full Pydantic 2.0 Support - Complete migration from Pydantic v1, with fixes for 2.12+ compatibility
  • Python 3.10-3.14 Support - Dropped Python 3.8/3.9, added support up to Python 3.14
  • Redis 8 Compatibility - Tested with Redis 8.4
  • New Query Features - Geo filtering, datetime queries, field projection with .values() and .only()
  • Hash Field Expiration - Per-field TTL support for Redis 7.4+
  • Conditional Persistence - save(nx=True) and save(xx=True) for atomic create/update
  • RedisVL Integration - New helpers (to_redisvl_schema(), get_redisvl_index()) for using Redis OM with RedisVL for advanced vector search
  • UV Package Management - Switched from Poetry to UV for faster dependency resolution

Breaking Changes

  • Python 3.8 and 3.9 dropped - Minimum Python version is now 3.10
  • Pydantic 2.0 required - Pydantic 1.x is no longer supported
  • Explicit indexing required - Models must use index=True class parameter (e.g., class MyModel(JsonModel, index=True))
  • Datetime fields stored as NUMERIC - Previously stored as TAG; requires data migration via om migrate-data

New Features

Query Enhancements

  • Geo Filtering - Query by geographic radius using pydantic-extra-types Coordinate type (#704)
  • Datetime Field Queries - Filter by datetime fields with proper NUMERIC indexing (#711)
  • Field Projection - .values() returns dicts, .only() returns partial model instances (#633)
  • Custom TAG Separators - Field(separator=",") for TAG fields (#800)

Persistence

  • Conditional Save - save(nx=True) only saves if key doesn't exist, save(xx=True) only updates existing (#746)
  • Hash Field Expiration - Field(expire=N), model.expire_field(), model.field_ttl(), model.persist_field() for Redis 7.4+ (#752)

Developer Experience

  • py.typed Marker - Full mypy/pyright support with PEP 561 marker (#771)
  • mypy __all__ exports - from aredis_om import ... now passes mypy --strict (#770)
  • Custom Primary Keys - Documentation for UUID v7 and custom PK generators (#795)
  • EmbeddedJsonModel - No longer generates unnecessary primary keys (#797)
  • Data Migrations System - New om migrate-data CLI for data transformations (#711)

Bug Fixes

Pydantic 2.0 Migration (#691)

  • Fix aliases breaking queries
  • Fix default values not working with multiple inheritance levels
  • Fix model_fields_set inaccuracy with exclude_unset=True
  • Fix context object being set to None during validation
  • Fix KNNExpression expecting removed ModelField type
  • Fix unintentional indexing of inherited fields

Query Fixes

  • Fix Enum with int values producing wrong query syntax (#108 via #792)
  • Fix IN operator not working for NUMERIC fields (#499 via #792)
  • Fix OR expression with KNN producing syntax error (#787)
  • Fix incorrect query prefixing for embedded models in query construction (#657)

Model Fixes

  • Fix Optional field retrieval breaking HashModel - empty strings now convert back to None (#254 via #792)
  • Fix inconsistent .pk behavior with custom primary keys (#784)
  • Fix HashModel list validation blocking vector fields - list[float] now allowed for vector fields (#785)
  • Fix bytes fields failing with UnicodeDecodeError - now uses base64 encoding (#783)
  • Fix EmbeddedJsonModel generating unnecessary primary keys (#797)
  • Fix TAG field separator not being honored (#800)

Compatibility Fixes

  • Fix Pydantic 2.12+ compatibility for custom FieldInfo with Annotated types (#727)
  • Fix Python 3.14 dict iteration error in JsonModel (#764)
  • Fix Python 3.13 issubclass changes with nested vector fields (#699)
  • Fix has_redisearch missing await (#771)
  • Fix Pydantic V3 deprecation warning for model_fields access (#770)
  • Fix cast from db connections with non-decoded output (#664)

CLI & Infrastructure

  • Fix CLI import_submodules to work with pyenv (#788)

Infrastructure

  • Switched from Poetry to UV for dependency management (#781)
  • Updated documentation to Material for MkDocs theme (#778)
  • Added benchmark test suite with regression detection (#798, #799)
  • Tested with Redis 8.4 (#768)
  • Updated PyPI classifier to "Production/Stable" (#769)
  • Added comprehensive example apps (FastAPI async, Flask sync) (#781)

Contributors

Thank you to all contributors across the beta releases:
@sethbuff, @ivanbelenky, @slorello89, @bsbodden, @AlboCode, @sav-norem, @bonastreyair, @huwaizatahir2, and the Redis team

Full Changelog: v0.3.5...v1.0.5

Don't miss a new redis-om-python release

NewReleases is sending notifications on new releases.