MCPcopy Index your code

hub / github.com/Gururagavendra/gmail-cleaner / functions

Functions345 in github.com/Gururagavendra/gmail-cleaner

↓ 13 callersFunctionget_gmail_service
Get authenticated Gmail API service. Returns: tuple: (service, error_message) - service is None if auth needed
app/services/auth.py:185
↓ 12 callersFunctionbuild_gmail_query
Build Gmail search query from filter parameters. Args: filters: dict with keys: - older_than: '7d', '30d', '90d', '180d', '36
app/services/gmail/helpers.py:92
↓ 5 callersFunction_is_file_empty
Check if a file exists and is empty. Args: file_path: Path to the file to check. Returns: True if file exists and is empty,
app/services/auth.py:32
↓ 4 callersFunctionis_web_auth_mode
Check if we should use web-based auth (for Docker/headless).
app/services/auth.py:52
↓ 3 callersFunctiondecode_base64_content
Decode base64 URL-safe encoded email content.
app/services/gmail/download.py:56
↓ 3 callersMethodreset_delete_scan
Reset delete scan state.
app/core/state.py:115
↓ 3 callersMethodreset_mark_read
Reset mark read state.
app/core/state.py:125
↓ 3 callersMethodreset_scan
Reset scan state.
app/core/state.py:105
↓ 2 callersFunction_apply_label_operation_background
Common helper for applying or removing labels from senders (background task). Args: label_id: The label ID to apply or remove sen
app/services/gmail/labels.py:109
↓ 2 callersFunction_try_refresh_creds
Attempt to refresh expired credentials and save to token file. Args: creds: Credentials that are expired but have a refresh_token. R
app/services/auth.py:94
↓ 2 callersFunctioncreate_app
Application factory - creates and configures the FastAPI app.
app/main.py:125
↓ 2 callersFunctiondelete_emails_by_sender
Delete all emails from a specific sender.
app/services/gmail/delete.py:180
↓ 2 callersFunctionformatDate
(dateStr)
static/js/scanner.js:14
↓ 2 callersFunctionformatDate
(dateStr)
static/js/delete.js:14
↓ 2 callersFunctionget_sender_info
Extract sender name and email from headers.
app/services/gmail/helpers.py:170
↓ 2 callersFunctionget_subject
Extract subject from email headers.
app/services/gmail/helpers.py:184
↓ 1 callersFunction_get_credentials_path
Get credentials - from file or create from env var. Returns: Path to valid credentials file, or None if not found or invalid.
app/services/auth.py:123
↓ 1 callersFunctioncheck_login_status
Check if user is logged in and get their email.
app/services/auth.py:639
↓ 1 callersFunctioncreate_label
Create a new Gmail label.
app/services/gmail/labels.py:50
↓ 1 callersFunctiondelete_label
Delete a Gmail label.
app/services/gmail/labels.py:88
↓ 1 callersFunctionget_archive_status
Get archive operation status.
app/services/gmail/archive.py:88
↓ 1 callersFunctionget_cache_bust_value
Get cache-busting value using a robust strategy: 1. Try git commit hash (most specific) 2. If uncommitted changes exist in static files,
app/main.py:22
↓ 1 callersFunctionget_delete_bulk_status
Get delete bulk operation status.
app/services/gmail/delete.py:436
↓ 1 callersFunctionget_delete_scan_results
Get delete scan results.
app/services/gmail/delete.py:175
↓ 1 callersFunctionget_delete_scan_status
Get delete scan status.
app/services/gmail/delete.py:170
↓ 1 callersFunctionget_download_csv
Get the generated CSV data.
app/services/gmail/download.py:195
↓ 1 callersFunctionget_download_status
Get download operation status (without CSV data).
app/services/gmail/download.py:183
↓ 1 callersFunctionget_email_body
Extract email body from payload. Prefers text/plain over text/html.
app/services/gmail/download.py:61
↓ 1 callersFunctionget_important_status
Get mark important operation status.
app/services/gmail/important.py:92
↓ 1 callersFunctionget_label_operation_status
Get label operation status.
app/services/gmail/labels.py:300
↓ 1 callersFunctionget_labels
Get all Gmail labels.
app/services/gmail/labels.py:11
↓ 1 callersFunctionget_mark_read_status
Get mark-as-read status.
app/services/gmail/mark_read.py:134
↓ 1 callersFunctionget_scan_results
Get scan results.
app/services/gmail/scan.py:234
↓ 1 callersFunctionget_scan_status
Get current scan status.
app/services/gmail/scan.py:229
↓ 1 callersFunctionget_unread_count
Get estimated count of unread emails in Inbox (fast, for display).
app/services/gmail/mark_read.py:14
↓ 1 callersFunctionget_unsubscribe_from_headers
Extract unsubscribe link from email headers.
app/services/gmail/helpers.py:143
↓ 1 callersFunctionget_web_auth_status
Get current web auth status.
app/services/auth.py:84
↓ 1 callersFunctionmain
()
main.py:23
↓ 1 callersFunctionneeds_auth_setup
Check if authentication is needed.
app/services/auth.py:57
↓ 1 callersMethodreset_archive
Reset archive state.
app/core/state.py:171
↓ 1 callersMethodreset_delete_bulk
Reset delete bulk state.
app/core/state.py:135
↓ 1 callersMethodreset_download
Reset download state.
app/core/state.py:147
↓ 1 callersMethodreset_important
Reset mark important state.
app/core/state.py:183
↓ 1 callersMethodreset_label_operation
Reset label operation state.
app/core/state.py:159
↓ 1 callersFunctionsign_out
Sign out by removing the token file.
app/services/auth.py:620
↓ 1 callersFunctionunsubscribe_single
Attempt to unsubscribe from a single sender.
app/services/gmail/unsubscribe.py:16
↓ 1 callersFunctionvalidate_unsafe_url
Validate URL to prevent SSRF. Checks scheme and resolves hostname to ensure it's not a local/private IP. Resolves all A and AAAA records
app/services/gmail/helpers.py:14
Method__init__
Initialize settings and auto-detect data directory for token persistence.
app/core/config.py:50
Method__init__
(self)
app/core/state.py:13
Method__init__
Initialize the handler with thread-safe callback primitives.
app/services/auth_handlers.py:30
Functionapi_apply_label
Apply a label to emails from selected senders.
app/api/actions.py:184
Functionapi_archive
Archive emails from selected senders (remove from inbox).
app/api/actions.py:226
Functionapi_archive_status
Get archive operation status.
app/api/status.py:223
Functionapi_auth_status
Get authentication status.
app/api/status.py:62
Functionapi_create_label
Create a new Gmail label.
app/api/actions.py:153
Functionapi_delete_bulk_status
Get bulk delete operation status.
app/api/status.py:181
Functionapi_delete_emails
Delete emails from a specific sender.
app/api/actions.py:113
Functionapi_delete_emails_bulk
Delete emails from multiple senders (background task with progress).
app/api/actions.py:131
Functionapi_delete_label
Delete a Gmail label.
app/api/actions.py:166
Functionapi_delete_scan
Scan senders for bulk delete.
app/api/actions.py:101
Functionapi_delete_scan_results
Get delete scan results (senders grouped by count).
app/api/status.py:127
Functionapi_delete_scan_status
Get delete scan status.
app/api/status.py:114
Functionapi_download_csv
Get the generated CSV file.
app/api/status.py:153
Functionapi_download_emails
Start downloading email metadata for selected senders.
app/api/actions.py:140
Functionapi_download_status
Get download operation status.
app/api/status.py:140
Functionapi_get_labels
Get all Gmail labels.
app/api/status.py:197
Functionapi_important_status
Get mark important operation status.
app/api/status.py:236
Functionapi_label_operation_status
Get label operation status (apply/remove).
app/api/status.py:210
Functionapi_mark_important
Mark/unmark emails from selected senders as important.
app/api/actions.py:238
Functionapi_mark_read
Mark emails as read.
app/api/actions.py:91
Functionapi_mark_read_status
Get mark-as-read operation status.
app/api/status.py:101
Functionapi_remove_label
Remove a label from emails from selected senders.
app/api/actions.py:205
Functionapi_results
Get email scan results.
app/api/status.py:49
Functionapi_scan
Start email scan for unsubscribe links.
app/api/actions.py:48
Functionapi_sign_in
Trigger OAuth sign-in flow.
app/api/actions.py:58
Functionapi_sign_out
Sign out and clear credentials.
app/api/actions.py:65
Functionapi_status
Get email scan status.
app/api/status.py:36
Functionapi_unread_count
Get unread email count.
app/api/status.py:88
Functionapi_unsubscribe
Unsubscribe from a single sender.
app/api/actions.py:78
Functionapi_web_auth_status
Get web auth status for Docker/headless mode.
app/api/status.py:75
FunctionapplyLabelToSelected
(label)
static/js/labels.js:308
FunctionapplyLabelToSenders
(labelId, senders)
static/js/labels.js:71
Functionapply_label_to_senders_background
Apply a label to all emails from specified senders (background task).
app/services/gmail/labels.py:270
FunctionarchiveSelected
()
static/js/labels.js:382
Functionarchive_emails_background
Archive emails from selected senders (remove INBOX label).
app/services/gmail/archive.py:13
FunctionautoUnsubscribe
(index)
static/js/scanner.js:196
Functioncallback
( _request_id, response, exception, results=batch_results )
app/services/gmail/download.py:96
FunctioncheckStatus
()
static/js/auth.js:8
FunctioncheckWebAuthMode
()
static/js/auth.js:136
Functionclear
()
static/js/filters.js:149
FunctionclearFilters
()
static/js/filters.js:214
Functionclient
FastAPI test client.
tests/conftest.py:13
FunctioncreateLabel
(name)
static/js/labels.js:32
FunctiondeleteLabel
(labelId)
static/js/labels.js:53
FunctiondeleteSelected
()
static/js/delete.js:256
FunctiondeleteSelectedSenders
()
static/js/delete.js:535
FunctiondeleteSenderEmails
(index)
static/js/delete.js:208
Functiondelete_emails_bulk
Delete emails from multiple senders.
app/services/gmail/delete.py:277
Functiondelete_emails_bulk_background
Delete emails from multiple senders with progress updates (background task). Optimized to collect all message IDs first, then batch delete in lar
app/services/gmail/delete.py:324
FunctiondisplayResults
()
static/js/scanner.js:144
next →1–100 of 345, ranked by callers