4.16.0 — 2026-07-15¶
← 4.17.0 | 4.15.0 → | ↑ 4.x series
Added¶
Adapters - Redis¶
- RediSearch Support - Added index-bound RediSearch operations to sync and async Redis adapters via
search_index(name), returningRedisSearchHandle/AsyncRedisSearchHandlebacked byredis.commands.search.- Index lifecycle:
create_index,drop_index,info,alter_schema_add, and alias management (add_alias,update_alias,delete_alias). - Document upsert for HASH and JSON indexes (
upsert_hash,upsert_json, and matching DTO helpers) with optional vector fields. - Query execution: full-text
search, vector KNN, hybrid text+KNN, andaggregatevia typed DTOs. - New ports:
RedisSearchHandlePortandAsyncRedisSearchHandlePortinsearch_ports.py; mock search handles updated for BDD coverage.
- Index lifecycle:
Configs¶
- FastAPI Middleware Settings - Added opt-in
FastAPIConfigflags for GZip, TrustedHost, and HTTPS redirect middleware, wired intoAppUtils.create_fastapi_appviaFastAPIUtils.setup_gzip,setup_trusted_host, andsetup_https_redirect.- New
.envvariables:FASTAPI__GZIP_MIDDLEWARE_IS_ENABLED,GZIP_MIDDLEWARE_MINIMUM_SIZE,GZIP_MIDDLEWARE_COMPRESSLEVEL,TRUSTED_HOST_MIDDLEWARE_IS_ENABLED,TRUSTED_HOST_MIDDLEWARE_ALLOWED_HOSTS,TRUSTED_HOST_MIDDLEWARE_WWW_REDIRECT,HTTPS_REDIRECT_MIDDLEWARE_IS_ENABLED. - TrustedHost middleware is skipped with a warning when enabled but
ALLOWED_HOSTSis empty.
- New
Models - DTOs¶
- RediSearch DTOs - Added typed DTOs under
archipy.models.dtos.redis.searchfor index schema (IndexSchemaDTO,IndexFieldConfig), document upsert (HashDocumentUpsertDTO,JsonDocumentUpsertDTO), search (SearchQueryDTO,KnnQueryDTO), aggregation (AggregationDTO), and results (SearchResultDTO).
Models - Types¶
- RediSearch Types - Added
VectorDistanceMetric(COSINE,L2,IP),VectorAlgorithm(FLAT,HNSW), andRedisIndexType(HASH,JSON) enums for index and vector field configuration.
Helpers - Utils¶
- FastAPI Middleware Setup - Added
FastAPIUtils.setup_gzip,setup_trusted_host, andsetup_https_redirect, registered increate_fastapi_appafter CORS and before metric/APM middleware.
Tests¶
Tests - App Utils¶
- FastAPI Middleware Scenarios - Extended
features/app_utils.featureandfeatures/steps/app_utils_steps.pywith opt-in GZip, TrustedHost, and HTTPS redirect middleware coverage.- GZip compresses responses above
minimum_sizeand skips small payloads. - TrustedHost allows configured hosts, rejects invalid
Hostheaders, and skips registration whenALLOWED_HOSTSis empty. - HTTPS redirect issues
307for HTTP requests when enabled; middleware absent when disabled.
- GZip compresses responses above
Tests - Redis Adapter¶
- RediSearch Feature Suite - Added sync and async BDD scenarios in
features/redis_adapter.feature(container/Redis Stack only) for index creation, HASH/JSON document upsert, KNN and hybrid search, aggregation, schema alteration, alias management, document deletion, and index drop.
Chore¶
- Release Workflow - Removed local
make bump-patch/bump-minor/bump-majortargets and related docs; releases are tagged onmaster(for example4.16.0) and publish is triggered by pushing the semver tag.
Dependencies¶
- Python Packages - Bumped
jdatetime5.3.0→6.0.1,boto31.43.46→1.43.48,httpx2[socks]2.5.0→2.7.0, andsentry-sdk2.64.0→2.65.0. - Dev Tools - Updated
ty0.0.58→0.0.59,boto3-stubs1.43.46→1.43.48,types-cachetools7.0.0.20260518→7.0.0.20260713, and pinnedtypes-protobuf>=7.34.1.20260518.
Documentation¶
Tutorials - Redis¶
- RediSearch Guide - Expanded the Redis adapter tutorial with index schema setup, HASH/JSON document upsert, full-text/KNN/hybrid search, aggregation, alias management, and Redis Stack requirements.
API Reference¶
- Added mkdocstrings entries for RediSearch ports/handles, search DTOs, and
redis_search_types.