Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

CalTo

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.

Features

  • 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

Tech Stack

  • Python 3.10+
  • customtkinter
  • CTkDateEntry
  • mysql-connector-python
  • python-dotenv
  • MySQL

Project Structure

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.

Requirements

Install dependencies:

pip install customtkinter mysql-connector-python ctkdateentry python-dotenv

You also need:

  • Python 3.10+
  • A running MySQL server

Database Setup

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)

Configuration

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.

Running

Run:

python calto.py

How to Use

  1. Launch the application.
  2. Use the left/right arrows to change dates.
  3. Press TODAY to jump back to the current day.
  4. Click the + button to create a new event.
  5. Fill in the event details and save.
  6. Click an existing event to edit or delete it.
  7. Tick the checkbox to mark a task as completed.

Notes

  • 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-python does 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.

Future Improvements

  • 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

Author

Created by Siddhant Ajmera.

About

A calendar and to-do app combined, made using Python, CustomTkinter, and MySQL Database.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages