Skip to content

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), returning RedisSearchHandle / AsyncRedisSearchHandle backed by redis.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, and aggregate via typed DTOs.
    • New ports: RedisSearchHandlePort and AsyncRedisSearchHandlePort in search_ports.py; mock search handles updated for BDD coverage.

Configs

  • FastAPI Middleware Settings - Added opt-in FastAPIConfig flags for GZip, TrustedHost, and HTTPS redirect middleware, wired into AppUtils.create_fastapi_app via FastAPIUtils.setup_gzip, setup_trusted_host, and setup_https_redirect.
    • New .env variables: 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_HOSTS is empty.

Models - DTOs

  • RediSearch DTOs - Added typed DTOs under archipy.models.dtos.redis.search for 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), and RedisIndexType (HASH, JSON) enums for index and vector field configuration.

Helpers - Utils

  • FastAPI Middleware Setup - Added FastAPIUtils.setup_gzip, setup_trusted_host, and setup_https_redirect, registered in create_fastapi_app after CORS and before metric/APM middleware.

Tests

Tests - App Utils

  • FastAPI Middleware Scenarios - Extended features/app_utils.feature and features/steps/app_utils_steps.py with opt-in GZip, TrustedHost, and HTTPS redirect middleware coverage.
    • GZip compresses responses above minimum_size and skips small payloads.
    • TrustedHost allows configured hosts, rejects invalid Host headers, and skips registration when ALLOWED_HOSTS is empty.
    • HTTPS redirect issues 307 for HTTP requests when enabled; middleware absent when disabled.

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-major targets and related docs; releases are tagged on master (for example 4.16.0) and publish is triggered by pushing the semver tag.

Dependencies

  • Python Packages - Bumped jdatetime 5.3.06.0.1, boto3 1.43.461.43.48, httpx2[socks] 2.5.02.7.0, and sentry-sdk 2.64.02.65.0.
  • Dev Tools - Updated ty 0.0.580.0.59, boto3-stubs 1.43.461.43.48, types-cachetools 7.0.0.202605187.0.0.20260713, and pinned types-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.