Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/Gururagavendra/gmail-cleaner
/ functions
Functions
345 in github.com/Gururagavendra/gmail-cleaner
⨍
Functions
345
◇
Types & classes
58
↳
Endpoints
83
↓ 13 callers
Function
get_gmail_service
Get authenticated Gmail API service. Returns: tuple: (service, error_message) - service is None if auth needed
app/services/auth.py:185
↓ 12 callers
Function
build_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 callers
Function
_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 callers
Function
is_web_auth_mode
Check if we should use web-based auth (for Docker/headless).
app/services/auth.py:52
↓ 3 callers
Function
decode_base64_content
Decode base64 URL-safe encoded email content.
app/services/gmail/download.py:56
↓ 3 callers
Method
reset_delete_scan
Reset delete scan state.
app/core/state.py:115
↓ 3 callers
Method
reset_mark_read
Reset mark read state.
app/core/state.py:125
↓ 3 callers
Method
reset_scan
Reset scan state.
app/core/state.py:105
↓ 2 callers
Function
_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 callers
Function
_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 callers
Function
create_app
Application factory - creates and configures the FastAPI app.
app/main.py:125
↓ 2 callers
Function
delete_emails_by_sender
Delete all emails from a specific sender.
app/services/gmail/delete.py:180
↓ 2 callers
Function
formatDate
(dateStr)
static/js/scanner.js:14
↓ 2 callers
Function
formatDate
(dateStr)
static/js/delete.js:14
↓ 2 callers
Function
get_sender_info
Extract sender name and email from headers.
app/services/gmail/helpers.py:170
↓ 2 callers
Function
get_subject
Extract subject from email headers.
app/services/gmail/helpers.py:184
↓ 1 callers
Function
_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 callers
Function
check_login_status
Check if user is logged in and get their email.
app/services/auth.py:639
↓ 1 callers
Function
create_label
Create a new Gmail label.
app/services/gmail/labels.py:50
↓ 1 callers
Function
delete_label
Delete a Gmail label.
app/services/gmail/labels.py:88
↓ 1 callers
Function
get_archive_status
Get archive operation status.
app/services/gmail/archive.py:88
↓ 1 callers
Function
get_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 callers
Function
get_delete_bulk_status
Get delete bulk operation status.
app/services/gmail/delete.py:436
↓ 1 callers
Function
get_delete_scan_results
Get delete scan results.
app/services/gmail/delete.py:175
↓ 1 callers
Function
get_delete_scan_status
Get delete scan status.
app/services/gmail/delete.py:170
↓ 1 callers
Function
get_download_csv
Get the generated CSV data.
app/services/gmail/download.py:195
↓ 1 callers
Function
get_download_status
Get download operation status (without CSV data).
app/services/gmail/download.py:183
↓ 1 callers
Function
get_email_body
Extract email body from payload. Prefers text/plain over text/html.
app/services/gmail/download.py:61
↓ 1 callers
Function
get_important_status
Get mark important operation status.
app/services/gmail/important.py:92
↓ 1 callers
Function
get_label_operation_status
Get label operation status.
app/services/gmail/labels.py:300
↓ 1 callers
Function
get_labels
Get all Gmail labels.
app/services/gmail/labels.py:11
↓ 1 callers
Function
get_mark_read_status
Get mark-as-read status.
app/services/gmail/mark_read.py:134
↓ 1 callers
Function
get_scan_results
Get scan results.
app/services/gmail/scan.py:234
↓ 1 callers
Function
get_scan_status
Get current scan status.
app/services/gmail/scan.py:229
↓ 1 callers
Function
get_unread_count
Get estimated count of unread emails in Inbox (fast, for display).
app/services/gmail/mark_read.py:14
↓ 1 callers
Function
get_unsubscribe_from_headers
Extract unsubscribe link from email headers.
app/services/gmail/helpers.py:143
↓ 1 callers
Function
get_web_auth_status
Get current web auth status.
app/services/auth.py:84
↓ 1 callers
Function
main
()
main.py:23
↓ 1 callers
Function
needs_auth_setup
Check if authentication is needed.
app/services/auth.py:57
↓ 1 callers
Method
reset_archive
Reset archive state.
app/core/state.py:171
↓ 1 callers
Method
reset_delete_bulk
Reset delete bulk state.
app/core/state.py:135
↓ 1 callers
Method
reset_download
Reset download state.
app/core/state.py:147
↓ 1 callers
Method
reset_important
Reset mark important state.
app/core/state.py:183
↓ 1 callers
Method
reset_label_operation
Reset label operation state.
app/core/state.py:159
↓ 1 callers
Function
sign_out
Sign out by removing the token file.
app/services/auth.py:620
↓ 1 callers
Function
unsubscribe_single
Attempt to unsubscribe from a single sender.
app/services/gmail/unsubscribe.py:16
↓ 1 callers
Function
validate_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
Function
api_apply_label
Apply a label to emails from selected senders.
app/api/actions.py:184
Function
api_archive
Archive emails from selected senders (remove from inbox).
app/api/actions.py:226
Function
api_archive_status
Get archive operation status.
app/api/status.py:223
Function
api_auth_status
Get authentication status.
app/api/status.py:62
Function
api_create_label
Create a new Gmail label.
app/api/actions.py:153
Function
api_delete_bulk_status
Get bulk delete operation status.
app/api/status.py:181
Function
api_delete_emails
Delete emails from a specific sender.
app/api/actions.py:113
Function
api_delete_emails_bulk
Delete emails from multiple senders (background task with progress).
app/api/actions.py:131
Function
api_delete_label
Delete a Gmail label.
app/api/actions.py:166
Function
api_delete_scan
Scan senders for bulk delete.
app/api/actions.py:101
Function
api_delete_scan_results
Get delete scan results (senders grouped by count).
app/api/status.py:127
Function
api_delete_scan_status
Get delete scan status.
app/api/status.py:114
Function
api_download_csv
Get the generated CSV file.
app/api/status.py:153
Function
api_download_emails
Start downloading email metadata for selected senders.
app/api/actions.py:140
Function
api_download_status
Get download operation status.
app/api/status.py:140
Function
api_get_labels
Get all Gmail labels.
app/api/status.py:197
Function
api_important_status
Get mark important operation status.
app/api/status.py:236
Function
api_label_operation_status
Get label operation status (apply/remove).
app/api/status.py:210
Function
api_mark_important
Mark/unmark emails from selected senders as important.
app/api/actions.py:238
Function
api_mark_read
Mark emails as read.
app/api/actions.py:91
Function
api_mark_read_status
Get mark-as-read operation status.
app/api/status.py:101
Function
api_remove_label
Remove a label from emails from selected senders.
app/api/actions.py:205
Function
api_results
Get email scan results.
app/api/status.py:49
Function
api_scan
Start email scan for unsubscribe links.
app/api/actions.py:48
Function
api_sign_in
Trigger OAuth sign-in flow.
app/api/actions.py:58
Function
api_sign_out
Sign out and clear credentials.
app/api/actions.py:65
Function
api_status
Get email scan status.
app/api/status.py:36
Function
api_unread_count
Get unread email count.
app/api/status.py:88
Function
api_unsubscribe
Unsubscribe from a single sender.
app/api/actions.py:78
Function
api_web_auth_status
Get web auth status for Docker/headless mode.
app/api/status.py:75
Function
applyLabelToSelected
(label)
static/js/labels.js:308
Function
applyLabelToSenders
(labelId, senders)
static/js/labels.js:71
Function
apply_label_to_senders_background
Apply a label to all emails from specified senders (background task).
app/services/gmail/labels.py:270
Function
archiveSelected
()
static/js/labels.js:382
Function
archive_emails_background
Archive emails from selected senders (remove INBOX label).
app/services/gmail/archive.py:13
Function
autoUnsubscribe
(index)
static/js/scanner.js:196
Function
callback
( _request_id, response, exception, results=batch_results )
app/services/gmail/download.py:96
Function
checkStatus
()
static/js/auth.js:8
Function
checkWebAuthMode
()
static/js/auth.js:136
Function
clear
()
static/js/filters.js:149
Function
clearFilters
()
static/js/filters.js:214
Function
client
FastAPI test client.
tests/conftest.py:13
Function
createLabel
(name)
static/js/labels.js:32
Function
deleteLabel
(labelId)
static/js/labels.js:53
Function
deleteSelected
()
static/js/delete.js:256
Function
deleteSelectedSenders
()
static/js/delete.js:535
Function
deleteSenderEmails
(index)
static/js/delete.js:208
Function
delete_emails_bulk
Delete emails from multiple senders.
app/services/gmail/delete.py:277
Function
delete_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
Function
displayResults
()
static/js/scanner.js:144
next →
1–100 of 345, ranked by callers