Reminders — API reference¶
CLI¶
Storage¶
connection
¶
Context manager that opens and closes a reminders database connection.
ensure_schema
¶
Apply any pending migrations to the database.
Safe to call on every connection open — checks a single integer and returns immediately if the schema is current.
| PARAMETER | DESCRIPTION |
|---|---|
conn
|
Open reminders database connection.
TYPE:
|
get_connection
¶
Open a reminders database connection.
The connection has WAL journal mode enabled (for concurrent reads) and the current schema applied via migrations.
| PARAMETER | DESCRIPTION |
|---|---|
db_path
|
Override the database path (defaults to
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Connection
|
A |
Queries¶
active_reminders
¶
active_reminders(
conn: Connection, *, now: datetime | None = None
) -> tuple[list[dict], list[dict]]
Return the active reminders split into (overdue, upcoming).
Both lists are ordered by due date. A reminder is overdue when its due time is at or before now (default: the current UTC time).
dismissed_reminders
¶
Return dismissed reminders, ordered by due date.
overdue_reminders
¶
Return only the overdue active reminders, ordered by due date.