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)andsave(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=Trueclass 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-typesCoordinatetype (#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 passesmypy --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-dataCLI 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_setinaccuracy withexclude_unset=True - Fix
contextobject being set toNoneduring validation - Fix
KNNExpressionexpecting removedModelFieldtype - 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
.pkbehavior 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
issubclasschanges with nested vector fields (#699) - Fix
has_redisearchmissing await (#771) - Fix Pydantic V3 deprecation warning for
model_fieldsaccess (#770) - Fix cast from db connections with non-decoded output (#664)
CLI & Infrastructure
- Fix CLI
import_submodulesto 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