Utilities API¶
The utils package contains small reusable functions used by the application.
Console¶
The console utility provides terminal-related functionality.
clear_console¶
Clears the current terminal screen in a platform-aware way.
Notifications¶
The notification utility provides notification cross-platform functionality.
send_notification¶
Send notification to user with specific title and message.
Class reference¶
Console¶
src.utils.console
¶
This module provides utility functions for console operations.
Functions:
| Name | Description |
|---|---|
clear_console |
Clears the terminal screen on both Windows and Unix-based systems. |
clear_console()
¶
Clear the console screen.
Works for both Windows (cls) and Unix-based (clear) operating systems.
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
This function does not return a value. |
Notifications¶
src.utils.notifications
¶
Send desktop notifications across Linux, macOS, and Windows. This snippet uses the plyer library for cross platform support
send_notification(title, message, timeout=5)
¶
Show system notification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str
|
Notification title. |
required |
message
|
str
|
Notification body. |
required |
timeout
|
int
|
Duration in seconds (may vary by OS). |
5
|
Return
None