CalTo is a desktop calendar and reminder application built with Python, CustomTkinter, and MySQL built by Siddhant Ajmera.
It combines a calendar and a to-do list into a single day view — every entry is either an Event or a Task, and both live on the same timeline.
- View events/tasks by date, one day at a time
- Add new events and tasks with name, type, date, time, location and notes
- Edit existing entries
- Delete entries
- Mark tasks as complete
- Navigate between days, or jump straight back to today
- Store all data in a MySQL database
- Python 3.10+
- customtkinter
- CTkDateEntry
- mysql-connector-python
- python-dotenv
- MySQL
CalTo/
├── calto.py # the entire application
├── .env # database credentials (not committed)
├── .gitignore
└── README.md
The application stores entries in a todo_info table inside the CalTo database and performs CRUD (Create, Read, Update, Delete) operations.
Install dependencies:
pip install customtkinter mysql-connector-python ctkdateentry python-dotenv
You also need:
- Python 3.10+
- A running MySQL server
Create the database and table:
CREATE DATABASE CalTo;
USE CalTo;
CREATE TABLE todo_info (
event_id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
type VARCHAR(20) NOT NULL,
event_time DATETIME NOT NULL,
location VARCHAR(255),
notes TEXT,
completed TINYINT(1) DEFAULT 0
);| Column | Purpose |
|---|---|
| event_id | Primary key, auto-generated |
| name | Event/task name |
| type | Event or Task |
| event_time | Date and time (must be DATETIME, not DATE) |
| location | Location |
| notes | Notes |
| completed | Completion status (0/1) |
Credentials are not stored in the script. Create a file named .env in the same folder as calto.py:
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_password_here
.env is listed in .gitignore, so your password is never committed to the repository.
Run:
python calto.py
- Launch the application.
- Use the left/right arrows to change dates.
- Press TODAY to jump back to the current day.
- Click the + button to create a new event.
- Fill in the event details and save.
- Click an existing event to edit or delete it.
- Tick the checkbox to mark a task as completed.
- Data is loaded from MySQL when the program starts and cached in memory.
- After every change, the table is re-read and the event list refreshes automatically.
- Changes are committed explicitly —
mysql-connector-pythondoes not autocommit. - All queries use parameterised placeholders (
%s), so the app is not vulnerable to SQL injection. - The connection does not select a default database, so queries are fully qualified as
CalTo.todo_info. - On Linux, MySQL table names are case-sensitive — create the database and table with the exact casing shown above.
- The UI uses a light theme by default.
- A new entry is saved to the date you picked, but the list stays on the date you were viewing.
- Search
- Recurring events
- Notifications
- Better validation (time fields currently accept non-numeric input)
- Error handling around database calls
- Sort entries by time
- Scrollable list for busy days
- User authentication
- Export/import calendar data
Created by Siddhant Ajmera.