Home

About

About MeWhat I DoSkillsHow I WorkFollow the Journey

Work

Python ProjectsFeatured ProjectsPortfolioGallery

Read

Blog

Coming Soon

Overview

Connect

ContactFacebook OPENInstagram OPENYouTube OPEN
Home/Work/Python Projects

Python Projects

Applications, database designs, automation scripts and experiments built during my computer science journey.

Python ApplicationsIn Active Development

Automated Data Ingestion & Sanitization Engine

CLI & backend pipeline for multi-format datasets

A modular Python application designed to ingest chaotic raw datasets (CSV, JSON, XML), validate schemas against strict data types, clean anomalies and output sanitized records.

  • Pluggable parser architecture using Python abstract base classes
  • Deterministic type coercion with schema validation reporting
  • Configurable export pipeline supporting SQL bulk insert and normalized JSON
Python 3.11ArgparsePydanticSQLite3Rich CLI
View code preview
import csv
from dataclasses import dataclass
from typing import List

@dataclass
class RecordItem:
    id: int
    label: str
    value: float
    status: str

def sanitize_batch(raw_filepath: str) -> List[RecordItem]:
    clean_items = []
    with open(raw_filepath, 'r', encoding='utf-8') as f:
        reader = csv.DictReader(f)
        for row in reader:
            try:
                clean_items.append(RecordItem(
                    id=int(row['id']),
                    label=row['label'].strip(),
                    value=float(row['value']),
                    status=row.get('status', 'PENDING').upper()
                ))
            except (ValueError, KeyError):
                continue
    return clean_items
Database ProjectsPrototype Ready

Relational Inventory & Order Tracking Schema

High-integrity SQL database & Python manager

A relational database implementation modeling stock items, suppliers, customer purchase orders and warehouse inventory transactions with strict foreign keys and transactional consistency.

  • Third Normal Form (3NF) tables with composite index optimization
  • SQL triggers preventing negative inventory levels upon checkout
  • Python database layer handling connection pooling and migrations
PostgreSQLSQLAlchemyPythonDockerIndexing
View code preview
CREATE TABLE inventory_items (
    item_id SERIAL PRIMARY KEY,
    sku VARCHAR(64) UNIQUE NOT NULL,
    name VARCHAR(255) NOT NULL,
    unit_price NUMERIC(10, 2) NOT NULL CHECK (unit_price >= 0),
    stock_quantity INT NOT NULL DEFAULT 0 CHECK (stock_quantity >= 0),
    created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);

CREATE INDEX idx_inventory_sku ON inventory_items(sku);
Automation ProjectsPipeline Designed

Scheduled Web Scraper & Alert System

Autonomous market price & inventory monitor

A headless automation script running at scheduled intervals to track currency exchange rates, fuel and essential goods, firing alerts when significant fluctuations occur.

  • Headless HTTP request dispatcher with custom rate-limiting
  • HTML DOM parser extracting numerical tables using BeautifulSoup
  • Notification worker dispatching structured digest emails via SMTP
PythonBeautifulSoup4RequestsCron / SystemdSMTP
View code preview
import requests
from bs4 import BeautifulSoup

def check_price_threshold(url: str, target_val: float):
    resp = requests.get(url, headers={'User-Agent': 'MDE-Monitor/1.0'})
    soup = BeautifulSoup(resp.text, 'html.parser')
    price_node = soup.find('span', {'class': 'market-rate'})
    current = float(price_node.text.replace('$', '').strip())

    if current < target_val:
        print(f"[ALERT] Threshold reached: {current} < {target_val}")
Backend and API ProjectsPrototype Ready

RESTful Service for Measurement & Unit Conversions

FastAPI backend powering high-precision conversions

A fast, documented REST backend calculating mass-to-volume culinary conversions for ingredients with variable densities, built for quick responses.

  • FastAPI with auto-generated OpenAPI / Swagger documentation
  • In-memory cached ingredient density lookup tables (g/cm³)
  • Structured error handling and input sanitization returning JSON
Python 3.11FastAPIUvicornPydanticPytest
View code preview
from fastapi import FastAPI, HTTPException

app = FastAPI(title="Grams2Cups Conversion API")

DENSITIES = {"flour": 138.0, "sugar": 200.0, "butter": 227.0, "cocoa": 100.0}

@app.get("/convert")
def convert(grams: float, ingredient: str):
    ing = ingredient.lower()
    if ing not in DENSITIES:
        raise HTTPException(status_code=400, detail="Ingredient density not indexed")
    cups = grams / DENSITIES[ing]
    return {"grams": grams, "ingredient": ing, "cups": round(cups, 3)}
Learning and Experimental ProjectsExperimental

Custom Data Structures & Sorting Algorithm Benchmarks

Exploring memory layouts and computational complexity

Hands-on implementations of core computer science structures (binary search trees, linked lists, hash maps) and comparative benchmarking of sorting algorithms.

  • Pure Python implementations written from first principles
  • Micro-benchmarking harness measuring execution time and call-stack depth
  • ASCII performance tables contrasting QuickSort, MergeSort and HeapSort
Python 3.10TimeitData StructuresAlgorithmsBenchmarking
View code preview
class BinarySearchTree:
    def __init__(self, key=None):
        self.key = key
        self.left = None
        self.right = None

    def insert(self, value):
        if self.key is None:
            self.key = value
        elif value < self.key:
            if self.left is None:
                self.left = BinarySearchTree(value)
            else:
                self.left.insert(value)
        else:
            if self.right is None:
                self.right = BinarySearchTree(value)
            else:
                self.right.insert(value)

Want to see more?

New scripts, schemas and experiments are added regularly.