Controller API
Controller Class
Import
from core.controller import ControllerConstructor
class MyController(Controller):
passProperties
logger
Controller Development Patterns
Handler Method Signatures
Static Methods (Recommended)
Instance Methods
Common Controller Patterns
Parameter Validation
Error Handling
Database Integration
Redis Integration
Response Publishing
Controller Organization
Single Responsibility
Method Naming Conventions
Testing Controllers
Unit Testing
Integration Testing
Best Practices
1. Keep Controllers Thin
2. Use Dependency Injection
3. Consistent Error Response Format
4. Use Type Hints
Last updated