3.13.3 — 2025-09-30¶
← 3.13.4 | 3.13.2 → | ↑ 3.x series
Changed¶
Documentation Examples - Complete Python 3.13 & Best Practices Update¶
-
Comprehensive Example Documentation Refactor - Updated all 17 example files to follow modern Python 3.13 standards and ArchiPy best practices
- Updated all type hints to Python 3.13 syntax (
|for unions, lowercase built-ins,typeinstead ofType) - Replaced
Union[X, Y]withX | Ythroughout all examples - Replaced
Optional[X]withX | Nonethroughout all examples - Changed
List,Dictto lowercaselist,dictconsistently - Removed
from typing import Union, Optionalin favor of native syntax
- Updated all type hints to Python 3.13 syntax (
-
Exception Handling Standardization - Implemented proper exception handling patterns across all examples
- Added
try-except-elsepattern with explicitreturnstatements inelseblocks - Ensured all exceptions use
raise ... from efor proper error chaining - Removed operation/query messages from exception constructors (per workspace rules)
- Replaced generic
Exception,ValueErrorwith specific ArchiPy error types - Added comprehensive error handling examples in all adapter documentation
- Added
-
Logging Standardization - Replaced all print statements with proper logging
- Added
logger = logging.getLogger(__name__)to all example files - Replaced all
print()statements with appropriatelogger.info(),logger.error(), etc. - Implemented consistent logging levels and informative messages
- Added logging configuration examples in code snippets
- Added
-
Documentation Structure Improvements - Enhanced navigation and cross-referencing
- Added "See Also" sections to all adapter examples
- Linked adapter examples to corresponding BDD test
.featurefiles - Added cross-references to error handling, configuration, and API documentation
- Improved code explanations with detailed docstrings
- Added warnings for common pitfalls and best practices
-
New Complete Examples Added
- Email adapter with FastAPI integration and comprehensive error handling
- SQLite adapter with async operations and context managers
- StarRocks adapter with analytical query patterns and batch operations
- Metaclasses with singleton pattern, thread safety, and best practices
- Parsian payment gateway with complete payment flow and error recovery
- Temporal workflow orchestration with atomic activities and worker management
-
Code Quality Improvements
- All examples now syntactically correct with proper indentation
- Fixed indentation errors in
error_handling.md - Added security warnings for sensitive data (passwords in
.envfiles) - Improved FastAPI integration examples with proper dependency injection
- Enhanced async/await patterns with proper error handling