How neonkid/python-mf-data works
Main Components
a) Core Framework Layer:
• Common module (/pymfdata/common)
• Database Specific Modules:
• RDB module (/pymfdata/rdb)
• MongoDB module (/pymfdata/mongodb)
b) Integration Layer:
• Supported Frameworks:
• FastAPI
• Falcon
• Other microframeworks
c) Database Layer:
• Primary Support:
• SQLAlchemy (RDB)
• MongoDB (in development)
• Database Dialects:
• PostgreSQL
• MySQL
• Oracle
• SQL Server
• SQLite
Component Relationships
[Microframeworks Layer]
• ↓
[Python-MF-Data Core]
• ↓
[Database Adapters]
• ↓
[Databases]
Detailed Component Breakdown
a) Core Framework Components:
[Common Module]
• Base UseCase
• Shared Utilities
[RDB Module]
• Connection Management
• Repository Pattern
• Transaction Handling
• Unit of Work Pattern
• Migration Support
• Mapping Utilities
[MongoDB Module]
• Connection Management
• Repository Pattern
Key Architectural Patterns to Highlight
a) Repository Pattern:
• Relationship between Repository protocols and implementations
• Generic type system for entities and primary keys
b) Unit of Work Pattern:
• Transaction management flow
• Session management and scoping
c) Connection Management:
• Both synchronous and asynchronous paths
• Connection pooling configuration
Implementation Details
a) Session Management:
[Connection Factory]
• ↓
[Session Factory]
• ↓
[Scoped Sessions]
b) Transaction Flow:
[Transactional Decorator]
• ↓
[Unit of Work]
• ↓
[Repository]
• ↓
[Database]