Releases: SyntaxArc/ArchiPy
3.15.3
Changed
Helpers - Decorators
- Lazy Import for SQLAlchemy Decorators - Changed SQLAlchemy decorators to use lazy imports via
__getattr__inarchipy.helpers.decorators- SQLAlchemy decorators are now only imported when actually accessed, not at module import time
- Prevents SQLAlchemy from being required when using archipy without the
sqlalchemyextra (e.g.,archipy[scylladb]) - Provides better error messages when SQLAlchemy decorators are accessed without the sqlalchemy extra installed
- Maintains full IDE support through type stubs using
TYPE_CHECKING
Adapters - Temporal
- Lazy Import for SQLAlchemy Decorators - Updated
AtomicActivityclass to use lazy imports for SQLAlchemy atomic decorators- Moved SQLAlchemy decorator imports from module level to method level in
_get_atomic_decorator() - Prevents SQLAlchemy from being required when using Temporal adapters without the sqlalchemy extra
- Improves modularity and allows using Temporal features independently of SQLAlchemy
- Moved SQLAlchemy decorator imports from module level to method level in
Full Changelog: 3.15.2...3.15.3
3.15.2
Added
Database Adapters - ScyllaDB
- Conditional Insert Support - Added
if_not_existsparameter toinsert()method in ScyllaDB adapter- Prevents errors on duplicate primary keys using CQL's
IF NOT EXISTSclause - Available in both synchronous (
ScyllaDBAdapter) and asynchronous (AsyncScyllaDBAdapter) adapters - Uses lightweight transactions to ensure idempotent insert operations
- Note: This feature is slower than regular inserts due to the lightweight transaction overhead
- Prevents errors on duplicate primary keys using CQL's
Testing
- Enhanced BDD Test Suite - Added test scenarios for ScyllaDB conditional insert functionality
- Test scenarios for
if_not_existsparameter in insert operations - Validation of duplicate key handling behavior
- Test scenarios for
Changed
Dependencies
-
Core Dependencies
- Updated
pydanticfrom>=2.12.4to>=2.12.5
- Updated
-
Optional Dependencies
- Updated
elastic-apmfrom>=6.24.0to>=6.24.1 - Updated
fastapifrom>=0.122.0to>=0.123.3 - Updated
miniofrom>=7.2.18to>=7.2.20 - Updated
postgres(psycopg) from>=3.2.13to>=3.3.0 - Updated
starrocksfrom>=1.2.3to>=1.3.1 - Updated
scylladboptional dependencies to includecachetools>=6.2.2andasync-lru>=2.0.5
- Updated
-
Development Dependencies
- Updated
mypyfrom>=1.18.2to>=1.19.0 - Updated
pre-commitfrom>=4.4.0to>=4.5.0
- Updated
-
Documentation Dependencies
- Updated
mkdocstrings-pythonfrom>=1.18.2to>=2.0.0 - Updated
mkdocstringsfrom>=0.30.1to>=1.0.0
- Updated
CI
- GitHub Actions - Updated
actions/checkoutfrom v5 to v6
New Contributors
- @hanieh-mav made their first contribution in #99
Full Changelog: 3.15.1...3.15.2
3.15.1
Added
Database Adapters - ScyllaDB Enhancements
-
Retry Policies - Added configurable retry policies for handling transient failures in ScyllaDB adapter
- Exponential backoff retry policy with configurable min/max intervals and max retries
- Fallthrough retry policy for no-retry scenarios
- Downgrading consistency retry policy for automatic consistency level adjustment
- Configuration options:
RETRY_POLICY,RETRY_MAX_NUM_RETRIES,RETRY_MIN_INTERVAL,RETRY_MAX_INTERVAL
-
Health Checks - Added comprehensive health check functionality
- Connection status verification with
is_connected()method for both sync and async adapters - Detailed health metrics including cluster state, host availability, and latency
health_check()method returning comprehensive cluster health information- Configurable health check timeout via
HEALTH_CHECK_TIMEOUTconfiguration
- Connection status verification with
-
Exception Handling - Improved error handling with centralized exception management
- Centralized
_handle_scylladb_exception()method for consistent error handling - Specific error messages for connection, query execution, and configuration issues
- Proper exception chaining for better debugging and error tracing
- Centralized
-
Helper Methods - Added convenience methods for common database operations
insert()method with TTL support for time-based data expirationupdate()method with conditional updates and TTL supportcount()method for counting rows with optional WHERE clause filteringexists()method for checking record existence based on conditionsclose()method for explicit connection cleanup and resource management
-
Connection Pool Monitoring - Added connection pool statistics and monitoring capabilities
get_pool_stats()method providing detailed metrics on pool utilization- Metrics include connections per host, in-flight requests, and pool health
- Configurable pool parameters:
MAX_CONNECTIONS_PER_HOST,MIN_CONNECTIONS_PER_HOST,CORE_CONNECTIONS_PER_HOST MAX_REQUESTS_PER_CONNECTIONconfiguration for request throttling- Optional pool monitoring via
ENABLE_CONNECTION_POOL_MONITORINGflag
-
Prepared Statement Caching - Implemented caching mechanism for prepared statements
- LRU cache with configurable size via
PREPARED_STATEMENT_CACHE_SIZE - Configurable TTL via
PREPARED_STATEMENT_CACHE_TTL_SECONDS - Automatic cache invalidation after TTL expiration
- Enable/disable via
ENABLE_PREPARED_STATEMENT_CACHEconfiguration - Improved performance for frequently executed queries
- LRU cache with configurable size via
-
Data Center Awareness - Added support for multi-datacenter deployments
- Local datacenter configuration via
LOCAL_DCfor optimized query routing - Replication strategy configuration:
REPLICATION_STRATEGY(SimpleStrategy, NetworkTopologyStrategy) - Per-datacenter replication factor configuration via
REPLICATION_CONFIG - Improved latency for geographically distributed deployments
- Local datacenter configuration via
Documentation
- ScyllaDB Adapter Documentation - Added comprehensive documentation for ScyllaDB adapter
- Complete usage examples for all adapter methods
- Configuration guide with all available options
- Best practices for connection pooling and performance tuning
- Examples for retry policies, health checks, and TTL usage
- Multi-datacenter deployment configuration examples
Testing
- Enhanced BDD Test Suite - Expanded Behave test scenarios for ScyllaDB adapter
- Added test scenarios for TTL functionality
- Added test scenarios for helper methods (count, exists, insert, update)
- Added test scenarios for health checks and connection status
- Added test scenarios for connection pool monitoring
- Improved test coverage for error handling and edge cases
Full Changelog: 3.15.0...3.15.1
3.15.0
Added
Database Adapters
- ScyllaDB/Cassandra Adapter - Implemented comprehensive adapter for ScyllaDB and Apache Cassandra databases
following the Ports & Adapters pattern- Added
ScyllaDBPortandAsyncScyllaDBPortinterfaces defining contracts for database operations - Implemented
ScyllaDBAdapterfor synchronous operations with connection pooling and session management - Implemented
AsyncScyllaDBAdapterfor asynchronous operations with async/await support - Supports CQL query execution, prepared statements, batch operations, and CRUD operations
- Provides keyspace and table management (create, drop, use keyspace)
- Includes connection management with automatic reconnection and session lifecycle handling
- Supports configurable consistency levels (ONE, QUORUM, ALL, LOCAL_QUORUM, etc.)
- Implements shard awareness for optimal performance (can be disabled for Docker/Testcontainer environments)
- Includes LZ4 compression support for network traffic optimization
- Added
Configuration
- ScyllaDB Configuration - Added
ScyllaDBConfigclass for managing ScyllaDB connection settings- Configurable contact points (cluster node addresses)
- Port configuration for CQL native transport (default: 9042)
- Authentication support (username/password)
- Protocol version selection (3-5)
- Connection and request timeout settings
- Consistency level configuration
- Compression enable/disable option
- Shard awareness control for containerized environments
- Integrated into
BaseConfigasSCYLLADBattribute - Added to configuration template with validation rules
Testing Infrastructure
-
ScyllaDB Test Container - Added
ScyllaDBTestContainerclass for integration testing- Single-node ScyllaDB container configuration optimized for testing
- Dynamic port allocation to prevent conflicts
- Automatic configuration injection into global config
- Resource-efficient setup (1 CPU, 750MB memory)
- Integrated with
ContainerManagerfor tag-based container startup - Added
@needs-scylladbtag support for selective test execution
-
BDD Test Suite - Comprehensive Behave test suite for ScyllaDB adapter
- Feature file covering keyspace operations, table management, CRUD operations
- Test scenarios for insert, select, update, delete operations
- Batch execution and prepared statement testing
- WHERE clause condition testing
- Error handling and edge case validation
- Step definitions implementing all adapter operations
Dependencies
- New Optional Dependency Group - Added
scylladboptional dependency group- Added
scylla-driver>=3.29.0for ScyllaDB/Cassandra driver support - Added
lz4>=4.3.0for compression support in network communication - Enables ScyllaDB adapter functionality when installed via
uv sync --extra scylladb
- Added
Full Changelog: 3.14.4...3.15.0
3.14.4
Changed
Dependency Updates
- Comprehensive Dependency Synchronization - Updated multiple core dependencies to latest versions for improved
security, performance, and bug fixes- Updated fastapi from 0.121.1 to 0.121.3 for enhanced API framework capabilities and bug fixes
- Updated cachetools from 6.2.1 to 6.2.2 for improved caching utilities and bug fixes
- Updated protobuf from 6.33.0 to 6.33.1 for enhanced protocol buffer support and bug fixes
- Updated redis from 7.0.1 to 7.1.0 for improved Redis client capabilities and performance
- Updated sentry-sdk from 2.43.0 to 2.45.0 for enhanced error tracking and monitoring
- Updated temporalio from 1.18.2 to 1.19.0 for improved workflow orchestration capabilities
- Updated testcontainers from 4.13.2 to 4.13.3 for enhanced testing infrastructure
- Updated bandit from 1.8.6 to 1.9.1 for improved security scanning capabilities
- Updated ruff from 0.14.4 to 0.14.5 for enhanced linting capabilities and bug fixes
- Updated mkdocs-material from 9.6.23 to 9.7.0 for improved documentation rendering
- Updated pymdown-extensions from 10.16.1 to 10.17.1 for enhanced markdown extensions
Test Infrastructure
- Test Container Image Updates - Updated test container images to latest versions for improved testing
reliability and compatibility- Updated Redis test container image from 8.2.3-alpine to 8.4.0-alpine
- Updated PostgreSQL test container image from 18.0-alpine to 18.1-alpine
- Updated Keycloak test container image from 26.4.2 to 26.4.5
- Updated Elasticsearch test container image from 9.2.0 to 9.2.1
Full Changelog: 3.14.3...3.14.4
3.14.3
Fixed
Redis Configuration
- Removed Invalid Retry on Timeout Configuration - Fixed Redis adapter configuration by removing unsupported parameter
- Removed
RETRY_ON_TIMEOUTfield fromRedisConfigclass as it does not exist in Redis cluster configuration - Removed
retry_on_timeoutparameter from both synchronous and asynchronous Redis adapter initialization - Resolves configuration errors when using Redis cluster mode with invalid parameters
- Ensures compatibility with redis-py library's actual parameter set
- Prevents potential runtime errors from passing unsupported configuration options
- Removed
Changed
Dependency Updates
- Comprehensive Dependency Synchronization - Updated multiple core dependencies to latest versions for improved
security, performance, and bug fixes- Updated fastapi from 0.120.2 to 0.121.1 for enhanced API framework capabilities and bug fixes
- Updated confluent-kafka from 2.12.1 to 2.12.2 for improved Kafka messaging reliability and performance
- Updated psycopg from 3.2.11 to 3.2.12 for enhanced PostgreSQL driver stability and bug fixes
- Updated pydantic-settings from 2.11.0 to 2.12.0 for improved settings management and validation
- Updated black from 25.9.0 to 25.11.0 for enhanced code formatting capabilities
- Updated pre-commit from 4.3.0 to 4.4.0 for improved git hook management
- Updated ruff from 0.14.3 to 0.14.4 for enhanced linting capabilities and bug fixes
Full Changelog: 3.14.2...3.14.3
3.14.2
Added
Testing Infrastructure
- Tag-Based Selective Container Startup - Implemented intelligent container startup based on feature tags for behave
tests- Added
TAG_CONTAINER_MAPmapping feature tags to container names (e.g.,@needs-postgres,@needs-kafka,
@needs-elasticsearch) - Implemented
extract_containers_from_tags()method inContainerManagerto automatically detect required
containers from feature/scenario tags - Enhanced
before_all()andbefore_feature()hooks inenvironment.pyto start only required containers based
on tags - Added container tags to feature files (
atomic_transactions.feature,elastic_adapter.feature,
kafka_adapters.feature,keycloak_adapter.feature,minio_adapter.feature) - Optimizes test execution by starting only necessary containers, reducing resource usage and test startup time
- Improves test isolation and parallel test execution capabilities
- Added
Changed
Testing Infrastructure
-
Dynamic Port Allocation for Testcontainers - Refactored test container initialization to use dynamic ports instead
of fixed ports- Updated all test container classes (
RedisTestContainer,PostgresTestContainer,KeycloakTestContainer,
ElasticsearchTestContainer,KafkaTestContainer,MinioTestContainer) to use dynamic port allocation - Containers now automatically assign available ports using
get_exposed_port()method from testcontainers - Enhanced container startup to update global configuration with actual dynamic host and port values
- Eliminates port conflicts when running multiple test suites in parallel or on shared CI/CD infrastructure
- Improved test reliability and compatibility across different environments
- Updated all test container classes (
-
Simplified Configuration Access - Streamlined configuration access patterns in test step definitions
- Refactored step definitions to use
BaseConfig.global_config()directly instead of complex configuration access
patterns - Updated step definitions across multiple modules (
app_utils_steps.py,base_config_steps.py,
datetime_utils_steps.py,elastic_adapter_steps.py,jwt_utils_steps.py,keycloak_adapter_steps.py,
minio_adapter_steps.py,password_utils_steps.py,totp_utils_steps.py) - Simplified
.env.testconfiguration file structure - Enhanced code maintainability and reduced configuration complexity in test infrastructure
- Improved developer experience with clearer configuration access patterns
- Refactored step definitions to use
Dependency Updates
- Comprehensive Dependency Synchronization - Updated multiple core dependencies to latest versions for improved
security, performance, and bug fixes- Updated pydantic from 2.12.3 to 2.12.4 for enhanced data validation and performance improvements
- Updated fakeredis from 2.32.0 to 2.32.1 for improved Redis mocking capabilities and bug fixes
- Updated grpcio from 1.75.1 to 1.76.0 for enhanced gRPC framework capabilities and performance improvements
- Updated grpcio-health-checking from 1.75.1 to 1.76.0 for improved health checking functionality
- Updated confluent-kafka from 2.12.0 to 2.12.1 for enhanced Kafka messaging capabilities and bug fixes
- Updated apscheduler from 3.11.0 to 3.11.1 for improved task scheduling capabilities and bug fixes
- Updated aiomysql from 0.2.0 to 0.3.2 for enhanced async MySQL connectivity and performance improvements
- Updated add-trailing-comma from 3.2.0 to 4.0.0 for improved code formatting capabilities
- Updated ruff from 0.14.0 to 0.14.3 for enhanced linting capabilities and bug fixes
- Updated types-cachetools from 6.2.0.20250827 to 6.2.0.20251022 for improved type stubs
- Updated types-protobuf from 6.32.1.20250918 to 6.32.1.20251105 for enhanced Protocol Buffers type support
- Updated types-regex from 2025.9.18.20250921 to 2025.11.3.20251106 for improved regex type hints
- Updated mkdocs-material from 9.6.21 to 9.6.23 for enhanced documentation rendering and Material theme features
Full Changelog: 3.14.1...3.14.2
3.14.1
Fixed
FastAPI Configuration Naming
- ReDoc Configuration Field Name Correction - Fixed typo in FastAPI configuration field name
- Corrected
RE_DOCS_URLtoRE_DOC_URLinFastAPIConfigclass to match FastAPI's actual parameter name - Updated
AppUtils.create_fastapi_app()to use correctredoc_urlparameter instead ofredocs_url - Ensures proper ReDoc documentation endpoint configuration in FastAPI applications
- Resolves potential configuration errors when setting up ReDoc documentation
- Corrected
Security
OpenAPI Schema Exposure
- OpenAPI Endpoint Disabled by Default - Enhanced security by disabling OpenAPI schema endpoint by default
- Changed
OPENAPI_URLdefault value from/openapi.jsontoNoneinFastAPIConfigclass - Prevents automatic exposure of API schema documentation in production environments
- Applications must explicitly enable OpenAPI schema by setting
OPENAPI_URLconfiguration value - Improves security posture by requiring opt-in for API documentation endpoints
- Aligns with security best practices for production deployments
- Changed
Changed
Dependency Updates
- Comprehensive Dependency Synchronization - Updated multiple core dependencies to latest versions for improved
security, performance, and bug fixes- Updated aiohttp from 3.13.1 to 3.13.2 for enhanced async HTTP client capabilities and bug fixes
- Updated alembic from 1.17.0 to 1.17.1 for improved database migration tool capabilities
- Updated elasticsearch from 9.1.1 to 9.2.0 for enhanced Elasticsearch connectivity and reliability
- Updated fastapi from 0.120.0 to 0.120.2 for improved API framework stability and bug fixes
- Updated python-dotenv from 1.1.1 to 1.2.1 for enhanced environment variable loading capabilities
- Updated redis from 7.0.0 to 7.0.1 for improved Redis client reliability and performance
- Updated rignore from 0.7.1 to 0.7.2 for enhanced ignore file handling
- Updated sentry-sdk from 2.42.1 to 2.43.0 for improved error tracking and monitoring capabilities
- Updated starlette from 0.48.0 to 0.49.1 for enhanced ASGI framework features and bug fixes
- Updated temporalio from 1.18.1 to 1.18.2 for improved workflow orchestration capabilities
- Updated virtualenv from 20.35.3 to 20.35.4 for enhanced virtual environment management
New Contributors
Full Changelog: 3.14.0...3.14.1
3.14.0
Added
gRPC Application Creation Utilities
- gRPC App Creation - Added comprehensive gRPC application creation utilities for both sync and async servers
- Added
AppUtils.create_async_grpc_app()method for async gRPC server creation with interceptor support - Added
AppUtils.create_grpc_app()method for synchronous gRPC server creation - Implemented automatic setup of exception, tracing, and metric interceptors
- Added
GrpcAPIUtilsclass with setup methods for trace and metric interceptors for sync gRPC servers - Added
AsyncGrpcAPIUtilsclass with setup methods for trace and metric interceptors for async gRPC servers - Integrated Prometheus metric collection with configurable HTTP server port
- Enhanced optional import handling for gRPC dependencies with proper graceful degradation
- Configured ThreadPoolExecutor with configurable worker count and server options
- Support for custom interceptors and compression settings
- Added
Prometheus Metrics Support
- Metric Collection - Added Prometheus metrics integration for gRPC servers
- Automatic metric interceptor setup when Prometheus is enabled in configuration
- Configurable HTTP server for metrics endpoint exposure
- Integrated metric collection for both sync and async gRPC servers
- Enhanced observability with automatic Prometheus client initialization
Changed
Kafka Producer Enhancements
- Key Parameter Support - Enhanced Kafka producer with proper key encoding support
- Added optional
keyparameter toKafkaProducerPort.produce()method signature - Implemented proper UTF-8 encoding for message keys using
_pre_process_message()helper - Ensures consistent handling of both string and bytes keys in message production
- Improved key/value consistency in Kafka message production workflow
- Added optional
Cache Decorator Optimization
- Lazy Import Optimization - Optimized TTL cache decorator import strategy
- Moved
cachetools.TTLCacheimport inside the decorator function to prevent global import issues - Improved module initialization performance by avoiding heavy dependencies at import time
- Maintained backward compatibility while improving startup time
- Enhanced import cleanliness and reduced initialization overhead
- Moved
Fixed
Kafka Producer Key Processing
- Key Encoding Fix - Fixed issue where message keys were not being properly processed
- Applied
_pre_process_message()to key parameter inproduce()method for proper encoding - Corrected key handling to match message value processing behavior
- Resolved potential encoding errors when using string keys in Kafka message production
- Enhanced BDD test coverage with proper key verification scenarios
- Applied
Import Cleanup
- Module Organization - Improved import structure across multiple modules
- Fixed unnecessary imports in Keycloak and MinIO adapters
- Enhanced import cleanup in decorators module
- Improved code organization and reduced import overhead
Full Changelog: 3.13.10...3.14.0
3.13.10
Changed
Dependency Updates
- Comprehensive Dependency Synchronization - Updated multiple core dependencies to latest versions for improved security and performance
- Updated aiohttp from 3.13.0 to 3.13.1 for enhanced async HTTP client capabilities and bug fixes
- Updated cryptography from 46.0.2 to 46.0.3 for improved cryptographic security and performance
- Updated elastic-transport from 9.1.0 to 9.2.0 for enhanced Elasticsearch connectivity and reliability
- Updated mkdocs-material from 9.6.21 to 9.6.22 for improved documentation rendering and Material theme features
- Updated protobuf from 6.32.1 to 6.33.0 for enhanced Protocol Buffers support and performance
- Updated pydantic from 2.12.2 to 2.12.3 for improved data validation and type safety
- Updated pytokens from 0.1.10 to 0.2.0 for enhanced token processing capabilities
- Updated ruff from 0.14.0 to 0.14.1 for improved linting capabilities and bug fixes
- Updated wrapt from 1.17.3 to 2.0.0 for enhanced function wrapping capabilities
Full Changelog: 3.13.9...3.13.10