Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Consiliency_treesitter-chunker /examples /sample_project /app.py
| """Main application module.""" | |
| from .config import Config | |
| from .services import NotificationService, UserService | |
| class Application: | |
| """Main application class.""" | |
| def __init__(self): | |
| self.user_service = UserService() | |
| self.notification_service = NotificationService() | |
| self.config = Config() | |
| def register_user(self, username, email, bio=None): | |
| """Register a new user.""" | |
| # Create user | |
| user = self.user_service.create_user(username, email, bio) | |
| # Send welcome notification | |
| self.notification_service.notify_user_created(user) | |
| return user | |
| def get_user_info(self, user_id): | |
| """Get complete user information.""" | |
| return self.user_service.get_user_with_profile(user_id) | |
| def main(): | |
| """Run the application.""" | |
| app = Application() | |
| # Register a user | |
| user = app.register_user( | |
| "john_doe", | |
| "john@example.com", | |
| "Software developer", | |
| ) | |
| # Get user info | |
| user_info = app.get_user_info(user.id) | |
| print(f"User: {user_info.username} ({user_info.email})") | |
| if __name__ == "__main__": | |
| main() | |
Xet Storage Details
- Size:
- 1.14 kB
- Xet hash:
- 560f154610c6261deb575743b74e842ed39d2d19e48688c95a1f2d2db497daac
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.