Report Automation Project
This project automates data cleaning, SQL query execution, and email reporting. It is modular, secure, and designed to run via Anaconda Prompt or be scheduled using batch scripts / Task Scheduler
π Folder Structure Report/ βββ configs/ β βββ auto_email.py β βββ email_template.py β βββ user_pwrd.py β βββ utils/ β βββ data_cleaning.py β βββ query.py β βββ main.py βββ run_with_failure_msg.py βββ run_with_scheduler.bat βββ README.md βοΈ Setup Instructions (Anaconda Prompt)
-
Open Anaconda Prompt Launch Anaconda Prompt from your Start Menu.
-
Create and Activate Environment conda create -n Report_Automation python=3.10 -y conda activate Report_Automation
-
Install Required Packages pip install pandas keyring
-
Set Up Email Credentials Securely import keyring keyring.set_password("gmail", "[email protected]", "your_password")
-
Ensure SQLite Database Exists Create example.db with a users table if needed: sqlite3 example.db CREATE TABLE users (name TEXT, age INTEGER);
π Running the Project Run Main Script python Report/main.py
Run with Error Handling python Report/main.py
Run via Batch Scheduler cd "C:\Working Directory\Review Report Automation" run_with_scheduler.bat
π§Ή Features Data Cleaning: whitespace removal, case standardization, duplicate handling SQL Queries: dynamic generation and execution Email Reports: SMTP-based email delivery with secure credentials Error Notifications: automatic email alerts on failure Scheduling: batch script for automation via Task Scheduler
π¬ Contact Author: Pooja K R Role: Data Analyst π§ [email protected]