Back to Projects

Grade 10 Automation Scripts

This project automates complex interactions with the placement.education.go.ke portal to streamline admission management, student confirmation, and transfer requests. It uses Selenium for web automation and integrates with MariaDB/MySQL for secure data synchronization, reducing manual data entry errors and saving time for school administrators.

Tech Stack

Python 3.7+ Selenium 4.x Chromium/Chromedriver MariaDB PyMySQL pdfplumber python-dotenv RapidFuzz Logging module

About this project

Grade 10 Automation Scripts

This project provides automated scripts for managing student placements and admissions on the Kenyan education placement portal. Designed for school administrators, these scripts eliminate manual data entry and reduce operational bottlenecks.

The system uses headless browser automation with real-time database synchronization to maintain data consistency between the web portal and local databases.

✨ Key Features

Automated Student Admission Processing

The confirm.py script automatically matches students from your database with portal records and marks them as committed. It handles search queries, name verification, and database updates with automatic logging of all operations and detailed error tracking.

Multi-Step Transfer Request Management

The transfer_request.py script intelligently manages transfer requests by scraping current admissions, comparing against pending students, and submitting only new requests. It prevents duplicate submissions and logs every transaction to avoid re-processing students who have already been handled.

Intelligent PDF Extraction from Admission Letters

The find_admission_keys.py script downloads admission letters in PDF format and automatically extracts critical data including admission codes and student names. It performs fuzzy name matching to verify data accuracy and flags school placement information for reporting purposes.

Secure Database Configuration Management

All scripts use environment variables via python-dotenv to securely store credentials and connection details. This approach prevents hardcoding sensitive information and allows easy configuration across different deployment environments without modifying source code.

OTP-Enabled Portal Authentication

Every script handles the two-factor authentication (OTP) requirement on the portal automatically. The system extracts OTP codes from the login page and enters them programmatically, enabling fully automated workflows without manual intervention at the authentication stage.

Real-Time Logging and Audit Trail

Comprehensive logging captures all script activities including successful operations, failures, and system errors. Logs are written to both console output and admission_log.log for historical tracking and debugging, making it easy to identify issues or audit automation activities.

Flexible Name Matching Algorithm

The verification system uses RapidFuzz for intelligent fuzzy string matching with configurable thresholds. It handles variations in student names, typos, and spelling differences while preventing false matches through strict minimum requirements and detailed match reporting.

Duplicate Prevention with State Tracking

The system maintains a transfer_requests table to track which students have already been processed. This prevents duplicate submissions and allows scripts to resume operations safely, with only genuinely new students being processed on subsequent runs.

Safe DOM Interaction with Stale Element Handling

Selenium interactions are protected against DOM mutations using explicit waits and stale element exception handling. The scripts automatically retry operations when page elements change, ensuring reliability even when the portal UI updates or elements are re-rendered dynamically.

Headless Browser Execution for Server Environments

Scripts are configured to run in headless mode on Linux servers without requiring a display. This enables deployment on cloud VMs, containers, and CI/CD pipelines, making the automation scalable and suitable for background task scheduling.

More Projects
Attachment Activity Tracker

A lightweight tool for logging and monitoring file activities within a system.

View project
Buffer_Auto-Poster

An automated tool that fetches high-quality portrait wallpapers and schedules th...

View project
Chama Platform

A digital management platform for savings and investment groups (chamas) in Keny...

View project