Skip to content

Releases: SyntaxArc/ArchiPy

4.17.0

Choose a tag to compare

@HosseinNejatiJavaremi HosseinNejatiJavaremi released this 15 Jul 15:18

Added

Adapters - Redis

  • Vector Range Search - Added vector range queries via RangeQueryDTO and SearchQueryDTO.from_range(), executed through sync and async RediSearch handles with optional metadata filters and score fields.
  • Vector Query Runtime Tuning - Added VectorQueryRuntimeDTO for per-query KNN, range, and hybrid tuning (ef_runtime, epsilon, batch_size, search_window_size, hybrid_policy, use_search_history, search_buffer_capacity, and cluster-only shard_k_ratio).
  • SVS-VAMANA Index Support - Extended vector index creation with VectorAlgorithm.SVS_VAMANA, including compression, construction window, graph degree, search window, training threshold, and reduce attributes validated at schema time.
  • RediSearch Cluster Support - RediSearch handles now work on standalone and cluster clients; cluster index listing routes keyless admin commands to a target node, and hash-tagged key prefixes keep indexed documents in a single slot.
  • Index Listing - Added list_search_indexes() on sync and async Redis adapters, backed by list_redis_search_indexes / list_redis_search_indexes_async.

Models - DTOs

  • Vector Query DTOs - Added VectorQueryRuntimeDTO and RangeQueryDTO; extended KnnQueryDTO and SearchQueryDTO with range, runtime, is_range, and from_range() factory helpers.

Models - Types

  • Vector Search Types - Added VectorType (BFLOAT16, FLOAT16, FLOAT32, FLOAT64, INT8, UINT8), VectorCompression (LVQ and LeanVec variants), VectorHybridPolicy (BATCHES, ADHOC_BF), and UseSearchHistory (OFF, ON, AUTO); extended VectorAlgorithm with SVS_VAMANA.

Changed

Adapters - Redis

  • Vector Field Schema Validation - VectorFieldConfig now rejects algorithm-incompatible tuning attributes (FLAT vs HNSW vs SVS-VAMANA) and limits SVS-VAMANA to FLOAT16 and FLOAT32 vector types.

Models - DTOs

  • Vector Field Configuration - Extended VectorFieldConfig with vector_type, HNSW tuning (m, ef_construction, ef_runtime, epsilon), and SVS-VAMANA tuning fields for index-time configuration.

Tests

Tests - Redis Adapter

  • Vector Search Scenarios - Extended features/redis_adapter.feature and step definitions with SVS-VAMANA index creation, vector range search, and runtime-tuning coverage for sync RediSearch operations.

Documentation

Tutorials - Redis

  • Vector Search Guide - Expanded the Redis adapter tutorial with SVS-VAMANA and HNSW tuning, cluster index prefixes, vector range queries, hybrid search on cluster, and VectorQueryRuntimeDTO examples.

API Reference

  • Updated mkdocstrings entries for Redis search DTOs and redis_search_types to cover new vector types, range queries, and runtime parameters.

Full Changelog: 4.16.0...4.17.0

4.16.0

Choose a tag to compare

@HosseinNejatiJavaremi HosseinNejatiJavaremi released this 15 Jul 14:05

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.

Full Changelog: 4.15.0...4.16.0

4.15.0

Choose a tag to compare

@HosseinNejatiJavaremi HosseinNejatiJavaremi released this 13 Jul 15:07

Added

Configs

  • FastAPI Rate Limit Settings - Added FastAPIRateLimitConfig and the BaseConfig.FASTAPI_RATE_LIMIT attribute, centralizing trusted-proxy resolution, Redis key layout, fail-open/closed behavior, X-RateLimit-* headers, and JWT-based identity for FastAPIRestRateLimitHandler.
    • New .env variables: FASTAPI_RATE_LIMIT__TRUSTED_PROXY_IPS, ALLOW_PRIVATE_IPS, KEY_PREFIX, FAIL_CLOSED, SKIP_METHODS, HASH_QUERY_PARAM_VALUES, REQUIRE_IDENTIFIER_FOR_QUERY_PARAMS, REJECT_UNKNOWN_CLIENT, RATE_LIMIT_HEADERS, IDENTITY_FROM_ACCESS_TOKEN.
  • gRPC Rate Limit Settings - Added GrpcRateLimitConfig and the BaseConfig.GRPC_RATE_LIMIT attribute, controlling Redis key layout, fail-open/closed behavior, skipped health-check methods, and JWT-based identity for the new gRPC rate-limit interceptors.
    • New .env variables: GRPC_RATE_LIMIT__IS_ENABLED, FAIL_CLOSED, IDENTITY_FROM_ACCESS_TOKEN.
    • When IS_ENABLED is True, AppUtils.create_grpc_app and AppUtils.create_async_grpc_app register the matching interceptor automatically.

Models - DTOs

  • Rate Limit Window DTO - Added RateLimitWindowDTO (calls_count, window_ms) with a key_suffix property producing a stable Redis key segment per tier. Shared by the FastAPI handler and both gRPC interceptors.

Helpers - Decorators

  • gRPC Rate Limit Decorator - Added grpc_rate_limit_decorator, attaching one or more rate-limit windows to a servicer method without wrapping it. Stacking the decorator declares independent burst and sustained tiers, all enforced in declaration order by GrpcServerRateLimitInterceptor.

Helpers - Utils

  • Rate Limit Utils - Added RateLimitUtils with compute_rate_limit_window (validates calls_count >= 1 and a positive combined window) and get_rate_limit_windows_from_callable (reads stacked windows off a function or bound method).
  • gRPC Interceptor Auto-Registration - Added GrpcAPIUtils.setup_rate_limit_interceptor and AsyncGrpcAPIUtils.setup_rate_limit_interceptor, wired into AppUtils.create_grpc_app / create_async_grpc_app to append the sync or async rate-limit interceptor when GRPC_RATE_LIMIT.IS_ENABLED is True.

Helpers - Interceptors

  • gRPC Rate Limit Interceptors - Added GrpcServerRateLimitInterceptor and AsyncGrpcServerRateLimitInterceptor, enforcing decorator-declared Redis-backed windows per RPC.
    • Uses atomic INCREX (saturate=True, enx=True, millisecond px expiry) to avoid check-then-act races.
    • Identity resolution: custom identifier_fn, JWT sub claim from a Bearer token in invocation metadata (IDENTITY_FROM_ACCESS_TOKEN), falling back to parsed peer host (ipv4:/ipv6:/unix: prefixes handled).
    • Breached windows abort with RESOURCE_EXHAUSTED (via RateLimitExceededError) including a computed retry_after; Redis/identity failures abort with UNAVAILABLE (via UnavailableError) when FAIL_CLOSED is True.
    • SKIP_METHODS excludes full gRPC method names (health checks by default) from rate limiting.
  • gRPC Identity Helpers - Added archipy.helpers.interceptors.grpc.rate_limit.identifiers with invocation_metadata_to_dict, extract_bearer_token_from_metadata, and resolve_jwt_access_token_sub_from_metadata, verifying Bearer tokens via JWTUtils and returning the sub claim.
  • FastAPI Identity Helpers - Added archipy.helpers.interceptors.fastapi.rate_limit.identifiers with extract_bearer_token and resolve_jwt_access_token_sub, used by FastAPIRestRateLimitHandler to bucket authenticated requests by user instead of IP.

Changed

Helpers - FastAPI Rate Limit

  • Handler Rewrite - FastAPIRestRateLimitHandler gained config-driven behavior sourced from FastAPIRateLimitConfig, with per-instance overrides for every setting.
    • Trusted Proxy Chain Resolution - Client IP is only taken from forwarded headers (Forwarded, X-Forwarded-For, X-Real-IP, CF-Connecting-IP, True-Client-IP) when the immediate peer is a configured trusted proxy (TRUSTED_PROXY_IPS, CIDR or exact match, or * to trust all peers). X-Forwarded-For is walked right-to-left with nginx real_ip_recursive semantics, skipping trusted hops and stripping port suffixes.
    • JWT-Based Identity - identity_from_access_token (default True) verifies a Bearer token via JWTUtils and buckets by sub, falling back to client IP when the token is missing or invalid.
    • Stacked Windows - New additional_windows parameter enforces extra RateLimitWindowDTO tiers alongside the primary window; all tiers must pass, and the most constrained remaining quota is reported in headers.
    • Rate Limit Headers - rate_limit_headers (default True) attaches X-RateLimit-Limit / X-RateLimit-Remaining on allowed responses and adds Retry-After on 429s.
    • Unknown Client Handling - reject_unknown_client (default True) returns 503 when no client identity can be resolved instead of silently allowing the request.
    • Query Param Safety - require_identifier_for_query_params (default True) raises InvalidArgumentError at construction when query_params is set without identifier_fn or identity_from_access_token, preventing client-controlled per-user quota targeting.
    • Redis Failure Handling - fail_closed (default True) returns 503 on Redis connection errors instead of allowing requests through.

Tests

Tests - gRPC Rate Limit

  • New Feature Suite - Added features/grpc_rate_limit.feature and features/steps/grpc_rate_limit_steps.py covering sync and async interceptor modes: within-limit success, over-limit RESOURCE_EXHAUSTED rejection, undecorated methods bypassing limits, stacked burst/sustained windows, per-JWT-user isolation, UNAVAILABLE abort when Redis is down and fail-closed, and InvalidArgumentError on invalid window construction.

Tests - FastAPI Rate Limit

  • Expanded Scenario Coverage - Extended features/fastapi_rate_limit.feature and features/steps/fastapi_rate_limit_steps.py.
    • X-RateLimit-Limit / X-RateLimit-Remaining header assertions on allowed and rejected responses.
    • Spoofed X-Real-IP is ignored without a configured trusted proxy; distinct clients are isolated only behind trusted proxies.
    • Multi-hop X-Forwarded-For chains, injected entries ahead of the real client, port-suffix stripping, and multiple X-Forwarded-For header fields combined per RFC 9110.
    • X-Real-IP precedence rules when X-Forwarded-For is also present.
    • 503 on Redis unavailability with fail_closed; InvalidArgumentError when query_params is set without an identifier.
    • JWT-based user isolation, fallback to client IP when a JWT is missing or invalid/expired.

Documentation

Tutorials - Decorators

  • gRPC Rate Limit Decorator - Added usage guide for grpc_rate_limit_decorator, including stacked burst/sustained window examples and interceptor registration.

Tutorials - Interceptors

  • gRPC Rate Limiting - Added a GrpcServerRateLimitInterceptor / AsyncGrpcServerRateLimitInterceptor guide covering GRPC_RATE_LIMIT config, automatic registration via AppUtils, JWT-based identity, and health-check exclusions.
  • FastAPI Rate Limiting - Expanded the FastAPIRestRateLimitHandler guide with trusted-proxy configuration, JWT identity, stacked additional_windows, and rate-limit header reference.

Getting Started

  • Complete User Example / Project Structure - Updated to reference the new rate-limiting configuration and helper modules.

API Reference

  • Added mkdocstrings entries for FastAPIRateLimitConfig, GrpcRateLimitConfig, grpc_rate_limit decorator, grpc.rate_limit interceptors and identifiers, RateLimitUtils, and RateLimitWindowDTO.

Full Changelog: 4.14.0...4.15.0

4.14.0

Choose a tag to compare

@HosseinNejatiJavaremi HosseinNejatiJavaremi released this 13 Jul 11:51

Added

Adapters - Elasticsearch

  • Document Scanning - Added scan() to ElasticsearchPort and async scan() to AsyncElasticsearchPort, delegating to elasticsearch.helpers.scan and elasticsearch.helpers.async_scan for scroll-based iteration over large result sets without manual scroll lifecycle management.
  • Bulk Action Types - Added ElasticsearchBulkActionType and ElasticsearchBulkResultType aliases for helper-format bulk actions and (success_count, error_count_or_error_list) return tuples.

Adapters - Redis

  • INCREX Window Counter - Added increx to RedisPort and AsyncRedisPort (and adapters/mocks), wrapping the Redis 8.8 INCREX command for atomic counter increments with optional bounds (lbound, ubound, saturate), expiration (ex, px, exat, pxat, persist, enx), and float or integer step sizes (byfloat, byint).
  • Array Data Structure - Added Redis 8.8 array commands to sync and async ports and adapters.
    • arset to write contiguous values at a starting index.
    • arget to read a single index.
    • arlen to return the array length.
    • ardel to delete one or more indices.
    • arring to append into a fixed-size ring buffer.
  • Sorted Set Aggregators - Added zunion and zinter to sync and async ports and adapters, including support for the Redis 8.8 COUNT aggregator that scores members by the number of input sets containing them (or weighted sum when per-set weights are provided).
  • Runtime Configuration - Added config_set and config_get to sync and async ports and adapters for reading and updating Redis server parameters (for example notify-keyspace-events for keyspace and subkey notifications).

Helpers - FastAPI Rate Limit

  • Atomic Rate Limiting - FastAPIRestRateLimitHandler now uses Redis INCREX with saturate=True, enx=True, and millisecond expiry instead of separate GET/SET/INCRBY/PTTL calls, eliminating check-then-act races under concurrent requests.

Changed

Adapters - Elasticsearch

  • Bulk Helper Integration - bulk() and async bulk() now delegate to elasticsearch.helpers.bulk and elasticsearch.helpers.async_bulk instead of the low-level client bulk API.
    • actions accepts any Iterable[ElasticsearchBulkActionType] (generators supported) instead of requiring a materialized list[dict[str, Any]].
    • Added stats_only parameter to return only success and error counts.
    • Return type changed from ElasticsearchResponseType to ElasticsearchBulkResultType — a (success_count, error_count_or_error_list) tuple. Update callers that previously parsed the raw client response.
    • Failures raise BulkIndexError when raise_on_error is true (default helper behaviour).

Tests

Tests - Elasticsearch Adapter

  • Bulk and Scan Scenarios - Added sync and async BDD scenarios for helper-format bulk operations (index, update, delete) and document scanning.
  • Step Refactor - Updated Elasticsearch step definitions to assert helper bulk result tuples and scan hit counts.

Tests - Redis Adapter

  • Redis 8.8 Feature Coverage - Added BDD scenarios for array operations (arset, arget, arlen, ardel, arring), INCREX rate-limit semantics, ZUNION/ZINTER with COUNT aggregator, and hash subkey notifications via config_set + PSUBSCRIBE.
  • Sync and Async Parity - New scenarios cover mock, container, and cluster adapter types for sync paths; container and cluster for async paths where applicable.
  • Test Image - Bumped Redis test container image to redis:8.8.0-alpine in .env.test to exercise Redis 8.8 commands.

Tests - FastAPI Rate Limit

  • Rate Limit Feature Suite - Added features/fastapi_rate_limit.feature with scenarios for within-limit success, 429 rejection with Retry-After, window expiry reset, and per-client isolation using X-Real-IP.

Documentation

Tutorials - Elasticsearch

  • Bulk and Scan Guides - Expanded the Elasticsearch adapter tutorial with helper-format bulk action generators, stats_only usage, scan() / async scan() examples, BulkIndexError troubleshooting, and performance guidance for batch writes and large result iteration.

Tutorials - Redis

  • INCREX Window Counter - Added sync and async increx() examples, parameter reference, Redis 8.8 requirement, and cross-link to the FastAPI rate limiting guide.

Tutorials - Interceptors

  • FastAPI Rate Limiting - Added a FastAPIRestRateLimitHandler dependency guide covering installation, Depends usage, INCREX-backed atomic limiting, client identification headers, and per-query-parameter buckets.

Dependencies

  • Python Packages - Bumped anyio 4.14.14.14.2.
  • Dev Tools - Updated ty 0.0.580.0.59 and types-boto3 stubs 7.0.0.202605187.0.0.20260713.

Full Changelog: 4.13.2...4.14.0

4.13.2

Choose a tag to compare

@HosseinNejatiJavaremi HosseinNejatiJavaremi released this 12 Jul 08:30

Fixed

Interceptors - FastAPI Metric

  • Nested Router Path Templates - Resolved metric path template resolution for nested routers in FastAPI 0.137+.
    • Added _flatten_routes() helper to expand _IncludedRouter entries before route matching.
    • Uses iter_route_contexts() for FastAPI >= 0.137.2, falls back to effective_route_contexts() for 0.137.0–0.137.1.

Changed

Configs - ScyllaDB

  • Default Replication Strategy - Changed ScyllaDBConfig.REPLICATION_STRATEGY default from SimpleStrategy to NetworkTopologyStrategy with default replication config {"datacenter1": 1}. Update environment files if using SimpleStrategy.

Decorators

  • Tracing & Deprecation - Removed redundant wrapper.__wrapped__ = func assignments from capture_transaction, capture_span, async_capture_transaction, async_capture_span, and method_deprecation_warning.

Models - Email DTOs

  • Frozen Model Mutation - Use object.__setattr__ in EmailAttachmentDTO to support Pydantic v2 frozen model semantics.

Documentation

Tutorials

  • Updated adapter tutorials for Elasticsearch, Email, Kafka, Keycloak, MinIO, PostgreSQL, Redis, ScyllaDB, SQLite, StarRocks, and Temporal.

Dependencies

  • Test Containers - Bumped Keycloak 26.6.426.7.0, Kafka 4.3.04.3.1, ScyllaDB 2026.1.52026.2.
  • Python Packages - Updated fastapi 0.1380.139, grpcio 1.81.11.82.1, protobuf 6.33.67.35.1, confluent-kafka 2.14.22.15.0, boto3 1.43.361.43.46, sentry-sdk 2.63.02.64.0, temporalio 1.29.01.30.0, and other minor bumps.
  • Dev Tools - Updated ruff 0.15.180.15.21, ty 0.0.520.0.58.

Full Changelog: 4.13.1...4.13.2

4.13.1

Choose a tag to compare

@HosseinNejatiJavaremi HosseinNejatiJavaremi released this 30 Jun 14:50

Added

Configs - Temporal

  • SDK 1.29 Client Settings - Expanded TemporalConfig with client connection options aligned to temporalio 1.29.
    • Added CLIENT_IDENTITY, API_KEY, LAZY_CONNECT, keep-alive intervals, and client RPC retry fields.
    • Added RPC_METADATA for custom RPC headers.
    • Added RETRY_INITIAL_INTERVAL and RETRY_NON_RETRYABLE_ERROR_TYPES for workflow/activity retry policies.

Adapters - Temporal

  • Worker Tuning Configuration - Wired new worker settings from TemporalConfig into TemporalWorkerManager.
    • Added WORKER_GRACEFUL_SHUTDOWN_SECONDS, WORKER_MAX_CACHED_WORKFLOWS, WORKER_DEBUG_MODE, WORKER_MAX_CONCURRENT_LOCAL_ACTIVITIES, and WORKER_DISABLE_EAGER_ACTIVITY_EXECUTION.
    • WorkerHandle.stop() now defaults to the configured graceful shutdown timeout.

Changed

Adapters - Temporal

  • Client Connection Wiring - TemporalAdapter.get_client() now passes keep-alive, RPC retry, identity, API key, and RPC metadata to Client.connect.
  • Retry Policy Defaults - Workflow start/execute and activity helpers now include initial_interval and non_retryable_error_types from config.

Documentation

  • Temporal Tutorial - Fixed install extra to archipy[temporalio] and documented new TEMPORAL__* environment variables.

Tests

Tests - Temporal Adapter

  • Extended Config Scenario - Added BDD coverage verifying client identity and worker debug mode flow from config into adapters.

Dependencies

  • temporalio - Requires temporalio>=1.29.0 for expanded client and worker configuration support.

Full Changelog: 4.13.0...4.13.1

4.12.1

Choose a tag to compare

@HosseinNejatiJavaremi HosseinNejatiJavaremi released this 23 Jun 09:02

Added

Chore - Agent Skills

  • Caveman Skills Bundle - Vendored Cursor agent skills under .agents/skills/ for terse AI-assisted development workflows.
    • caveman — response-style skill with lite, full, and ultra intensity levels.
    • cavecrew — decision guide for delegating to caveman-style subagents (investigator, builder, reviewer).
    • caveman-commit — Conventional Commits message generator.
    • caveman-compress — memory-file compression with CLI scripts, validation, and benchmark tooling.
    • caveman-help, caveman-review, caveman-stats — help, diff review, and token-stats utilities.
  • Skills Lockfile - Added skills-lock.json to pin skill sources and content hashes from JuliusBrussee/caveman.

Changed

Dependencies - FastAPI Compatibility

  • FastAPI Pin Lift - Raised the fastapi extra from >=0.136,<0.137 to >=0.138.0, removing the upper bound
    introduced in 4.11.1 now that the codebase is compatible with FastAPI 0.138+.

Dependencies

  • Optional extras - Updated optional adapter dependency pins.
    • elastic-apm: >=6.26.1>=6.26.2
    • fastapi: fastapi[all]>=0.136,<0.137fastapi[all]>=0.138.0
    • minio: boto3>=1.43.34>=1.43.36
  • Dev group - Updated development tooling pins.
    • boto3-stubs: >=1.43.34>=1.43.36
    • ty: >=0.0.51>=0.0.52
  • Docs group - Updated documentation tooling pins.
    • pymdown-extensions: >=10.21.3>=11.0
  • Lockfile - Regenerated uv.lock to align with the updated pyproject.toml constraints.

Full Changelog: 4.12.0...4.12.1

4.12.0

Choose a tag to compare

@HosseinNejatiJavaremi HosseinNejatiJavaremi released this 20 Jun 07:32

Added

Adapters - MinIO

  • Object Existence Check - Added object_exists to MinioPort and MinioAdapter for lightweight presence checks without downloading object content.
    • Returns True when the object key exists and False when it does not.
    • Cached for five minutes via @ttl_cache_decorator to reduce repeated HEAD requests.
  • Batch Object Deletion - Added remove_objects for deleting multiple object keys in a single S3 DeleteObjects call.
    • Clears object-related caches after a successful batch delete.
  • Object Tag Operations - Added tag management methods for per-object metadata used with lifecycle-based expiration.
    • set_object_tags replaces all tags on an existing object.
    • get_object_tags returns the current tag mapping (empty dict when none are set).
    • remove_object_tags clears all tags from an object.
  • Upload-Time Tags - Extended put_object and put_object_stream with an optional tags: dict[str, str] | None parameter so tags can be applied at upload time.
  • Bucket Lifecycle / TTL - Added lifecycle configuration methods for automatic object expiration.
    • set_bucket_lifecycle accepts S3-format lifecycle rule dicts (MinioLifecycleRuleType).
    • get_bucket_lifecycle returns configured rules or an empty list when none are set.
    • delete_bucket_lifecycle removes all lifecycle rules from a bucket.
  • Object Versioning - Added bucket versioning and version-level delete support.
    • set_bucket_versioning enables or suspends versioning on a bucket.
    • get_bucket_versioning returns Enabled, Suspended, or an empty string when never configured.
    • list_object_versions lists version entries and delete markers with normalized metadata (MinioObjectVersionType).
    • remove_object_version permanently deletes a specific version by version_id.

Changed

Adapters - StarRocks

  • Type Ignore Cleanup - Removed redundant # type: ignore[invalid-assignment] comments from StarRocks SQLAlchemy compiler patches, keeping only the ty: ignore directives.

Documentation - MinIO

  • Tutorial Expansion - Extended docs/tutorials/adapters/minio.md with examples for object existence checks, batch deletion, object tags, and versioning workflows.
  • API Reference Clarification - Updated the MinIO adapter API reference to state that the concrete adapter wraps boto3 for S3-compatible storage.

Tests

Tests - MinIO Adapter

  • Tag Scenarios - Added BDD coverage for upload-time tags, setting tags on existing objects, and removing all tags.
  • Lifecycle Scenarios - Added scenarios for setting, verifying, and deleting bucket lifecycle rules.
  • Existence and Batch Delete - Added scenarios for object_exists before and after deletion, and for remove_objects batch cleanup.
  • Versioning Scenarios - Added end-to-end coverage for enabling versioning, uploading multiple versions, listing versions, and permanently deleting the oldest version.

Dependencies

  • Core dependencies - Updated base package pins in pyproject.toml.
    • pydantic-settings: >=2.14.1>=2.14.2
  • Optional extras - Updated optional adapter dependency pins.
    • dependency-injection: dependency-injector>=4.49.0>=4.49.1
    • minio: boto3>=1.43.32>=1.43.34
    • parsian-ipg / parsian-ipg-async: zeep>=4.3.2>=4.3.3
  • Dev group - Updated development tooling pins.
    • boto3-stubs: >=1.43.32>=1.43.34
    • ruff: >=0.15.17>=0.15.18
    • ty: >=0.0.50>=0.0.51
  • Docs group - Updated documentation tooling pins.
    • mkdocstrings-python: >=2.0.4>=2.0.5
  • Lockfile - Regenerated uv.lock to align with the updated pyproject.toml constraints.

Full Changelog: 4.11.1...4.12.0

4.11.1

Choose a tag to compare

@HosseinNejatiJavaremi HosseinNejatiJavaremi released this 18 Jun 17:39

Fixed

Dependencies - FastAPI Compatibility

  • FastAPI Upper Bound — Pinned fastapi to >=0.136,<0.137 to prevent breakage from FastAPI 0.137+
    which introduced incompatible changes with the current codebase.

Refactored

Tooling - Testing Execution Model

  • Removed Parallel Behave Settings — Deleted parallel = 8 and parallel_scheme = "multiprocessing" from
    [tool.behave] in pyproject.toml. Tests now run sequentially by default, aligning with the BDD convention
    of isolated scenarios.
  • Updated AGENTS.md — Refreshed quick commands and dev setup instructions.
  • Documentation Alignment — Brought docs/getting-started/project_structure.md in sync with current layout.

Full Changelog: 4.11.0...4.11.1

4.11.0

Choose a tag to compare

@HosseinNejatiJavaremi HosseinNejatiJavaremi released this 18 Jun 10:23

Added

Adapters - MinIO

  • Stream Upload and Download - Added put_object_stream and get_object_stream to MinioPort and
    MinioAdapter for in-memory and binary-stream object I/O without temporary files.
    • put_object_stream accepts bytes | BinaryIO, optional length, and content_type, and clears the
      list_objects cache after upload.
    • get_object_stream returns the full object body as bytes.

Models - Internet Payment Gateways

  • Parsian and Saman IPG DTOs - Extracted payment gateway request/response models into the domain layer.
    • Added archipy/models/dtos/parsian_ipg_dtos.py with payment, confirm, confirm-with-amount, and reverse DTOs.
    • Added archipy/models/dtos/saman_ipg_dtos.py with payment, verify, and reverse DTOs (including
      PaymentResponseDTO status validation).

Changed

Adapters - Internet Payment Gateways

  • DTO Import Refactor - Parsian and Saman Shaparak ports, adapters, and package __init__ modules now import
    DTOs from archipy.models.dtos instead of defining them inline in ports.py.

Chore - Tooling

  • Ruff Source Paths - Removed unused [tool.pytest.ini_options] from pyproject.toml, narrowed Ruff src to
    archipy and features, and updated per-file ignores for the base/sqlalchemy adapter path.
  • CI Lint Scope - Ruff check and format workflows now include features/steps and scripts alongside archipy.

Tests

Tests - MinIO Adapter

  • Stream Upload Scenarios - Extended features/minio_adapter.feature with outline scenarios for bytes and
    BinaryIO uploads followed by streaming download verification.
  • Flexible Upload Steps - Refactored MinIO step definitions to support stream-based uploads via
    put_object_stream.

Tests - FastAPI MinIO Upload

  • Large File End-to-End Uploads - Added features/fastapi_minio_upload.feature and step implementations covering
    50 MB, 75 MB, and 100 MB multipart uploads through a FastAPI endpoint backed by put_object_stream.

Chore

Test Containers

  • Image Pin Updates - Bumped test container images in .env.test.
    • Temporal: temporalio/temporal:1.5.1temporalio/temporal:1.7.2
    • Redis: redis:8.6.3-alpineredis:8.6.4-alpine
    • Keycloak: keycloak/keycloak:26.6.2keycloak/keycloak:26.6.3
    • ScyllaDB: scylladb/scylla:2026.1.2scylladb/scylla:2026.1.5

Dependencies

  • Optional extras - Updated optional adapter and dev dependencies.
    • fakeredis: fakeredis>=2.36.1fakeredis>=2.36.2
    • fastapi: fastapi[all]>=0.137.0fastapi[all]>=0.137.2
    • minio: boto3>=1.43.29boto3>=1.43.32
    • scylladb: scylla-driver>=3.29.10scylla-driver>=3.29.11
    • sentry: sentry-sdk>=2.62.0sentry-sdk>=2.63.0
    • sqlalchemy / sqlalchemy-async: sqlalchemy>=2.0.50sqlalchemy>=2.0.51
  • Dev group - Updated development tooling pins.
    • boto3-stubs: boto3-stubs>=1.43.14boto3-stubs>=1.43.32
    • ruff: ruff>=0.15.14ruff>=0.15.17
    • ty: ty>=0.0.39ty>=0.0.50
    • types-grpcio: types-grpcio>=1.0.0.20260518types-grpcio>=1.0.0.20260614
    • mkdocstrings-python: mkdocstrings-python>=2.0.3mkdocstrings-python>=2.0.4

Full Changelog: 4.10.2...4.11.0