<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://johnwick.cc/index.php?action=history&amp;feed=atom&amp;title=Automating_My_Workflow_With_Python</id>
	<title>Automating My Workflow With Python - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://johnwick.cc/index.php?action=history&amp;feed=atom&amp;title=Automating_My_Workflow_With_Python"/>
	<link rel="alternate" type="text/html" href="https://johnwick.cc/index.php?title=Automating_My_Workflow_With_Python&amp;action=history"/>
	<updated>2026-05-06T23:58:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.1</generator>
	<entry>
		<id>https://johnwick.cc/index.php?title=Automating_My_Workflow_With_Python&amp;diff=3078&amp;oldid=prev</id>
		<title>PC: Created page with &quot;How I built tools that quietly handle the boring stuff so I can focus on real problems  500px  I’ve tried a bunch of VPNs, but this one really stands out. It lets me: ✔ Stream Netflix, YouTube &amp; live sports from anywhere ✔ Stay 100% private — no tracking, no spying ✔ Protect all your devices at once + 1TB cloud storage ✔ Ultra-fast servers for lag-free streaming &amp; browsing ✔ Secure banking &amp; on...&quot;</title>
		<link rel="alternate" type="text/html" href="https://johnwick.cc/index.php?title=Automating_My_Workflow_With_Python&amp;diff=3078&amp;oldid=prev"/>
		<updated>2025-12-13T11:20:23Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;How I built tools that quietly handle the boring stuff so I can focus on real problems  &lt;a href=&quot;/index.php?title=File:Automating_My_Workflow_With_Python.jpg&quot; title=&quot;File:Automating My Workflow With Python.jpg&quot;&gt;500px&lt;/a&gt;  I’ve tried a bunch of VPNs, but this one really stands out. It lets me: ✔ Stream Netflix, YouTube &amp;amp; live sports from anywhere ✔ Stay 100% private — no tracking, no spying ✔ Protect all your devices at once + 1TB cloud storage ✔ Ultra-fast servers for lag-free streaming &amp;amp; browsing ✔ Secure banking &amp;amp; on...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;How I built tools that quietly handle the boring stuff so I can focus on real problems&lt;br /&gt;
&lt;br /&gt;
[[file:Automating_My_Workflow_With_Python.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
I’ve tried a bunch of VPNs, but this one really stands out. It lets me:&lt;br /&gt;
✔ Stream Netflix, YouTube &amp;amp; live sports from anywhere ✔ Stay 100% private — no tracking, no spying ✔ Protect all your devices at once + 1TB cloud storage ✔ Ultra-fast servers for lag-free streaming &amp;amp; browsing ✔ Secure banking &amp;amp; online payments anywhere ✔ Bypass restrictions &amp;amp; access content your country blocks ✔ Unlock a hidden 70%+ discount — massive savings you won’t get elsewhere&lt;br /&gt;
Honestly, it’s the best VPN I’ve used so far.&lt;br /&gt;
⚡ 14M+ users are already using it worldwide.&lt;br /&gt;
👉 Get NordVPN with 70%+ OFF + 3 Free Month&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When I first started coding, I wasted hours on repetitive tasks: renaming files, cleaning data, writing boilerplate reports. Over time, I discovered that Python could do most of this for me. The more I automated, the more I realized — automation isn’t just about efficiency. It’s about freeing up brainpower for harder problems.&lt;br /&gt;
&lt;br /&gt;
In this article, I’ll walk through the automation systems I’ve built with Python. Each section will show code, tools, and the deeper principles behind making Python do the heavy lifting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Automating File Renaming With os and pathlib&lt;br /&gt;
Every company I’ve worked with had some form of “file naming mess.” Python fixes that in minutes.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import os&lt;br /&gt;
from pathlib import Path&lt;br /&gt;
&lt;br /&gt;
directory = Path(&amp;quot;C:/reports/&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
for i, file in enumerate(directory.iterdir(), start=1):&lt;br /&gt;
    if file.is_file():&lt;br /&gt;
        new_name = directory / f&amp;quot;report_{i}{file.suffix}&amp;quot;&lt;br /&gt;
        file.rename(new_name)&lt;br /&gt;
        print(f&amp;quot;Renamed {file} -&amp;gt; {new_name}&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of wasting time renaming 200 files manually, you let Python do it in seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Cleaning CSVs With pandas&lt;br /&gt;
Messy CSVs are a fact of life. Luckily, pandas makes data cleaning almost effortless.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import pandas as pd&lt;br /&gt;
&lt;br /&gt;
df = pd.read_csv(&amp;quot;sales.csv&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# clean column names&lt;br /&gt;
df.columns = [col.strip().lower().replace(&amp;quot; &amp;quot;, &amp;quot;_&amp;quot;) for col in df.columns]&lt;br /&gt;
&lt;br /&gt;
# fill missing values&lt;br /&gt;
df[&amp;quot;revenue&amp;quot;] = df[&amp;quot;revenue&amp;quot;].fillna(0)&lt;br /&gt;
&lt;br /&gt;
# remove duplicates&lt;br /&gt;
df = df.drop_duplicates()&lt;br /&gt;
&lt;br /&gt;
df.to_csv(&amp;quot;clean_sales.csv&amp;quot;, index=False)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script takes a nightmare spreadsheet and makes it analysis-ready.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Generating Automated Reports&lt;br /&gt;
Instead of copy-pasting numbers into slides, I let Python generate reports with matplotlib and jinja2.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import pandas as pd&lt;br /&gt;
import matplotlib.pyplot as plt&lt;br /&gt;
from jinja2 import Template&lt;br /&gt;
&lt;br /&gt;
df = pd.read_csv(&amp;quot;clean_sales.csv&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
plt.plot(df[&amp;quot;date&amp;quot;], df[&amp;quot;revenue&amp;quot;])&lt;br /&gt;
plt.savefig(&amp;quot;plot.png&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
template = Template(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;h1&amp;gt;Sales Report&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Total Revenue: {{ total }}&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;img src=&amp;quot;plot.png&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
html_report = template.render(total=df[&amp;quot;revenue&amp;quot;].sum())&lt;br /&gt;
&lt;br /&gt;
with open(&amp;quot;report.html&amp;quot;, &amp;quot;w&amp;quot;) as f:&lt;br /&gt;
    f.write(html_report)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That’s a full data report with visualization — done automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Automating Emails With smtplib&lt;br /&gt;
Reports are useless unless they’re shared. Python can email them automatically.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import smtplib&lt;br /&gt;
from email.message import EmailMessage&lt;br /&gt;
&lt;br /&gt;
msg = EmailMessage()&lt;br /&gt;
msg[&amp;quot;Subject&amp;quot;] = &amp;quot;Weekly Sales Report&amp;quot;&lt;br /&gt;
msg[&amp;quot;From&amp;quot;] = &amp;quot;me@example.com&amp;quot;&lt;br /&gt;
msg[&amp;quot;To&amp;quot;] = &amp;quot;team@example.com&amp;quot;&lt;br /&gt;
msg.set_content(&amp;quot;See attached report.&amp;quot;)&lt;br /&gt;
msg.add_attachment(open(&amp;quot;report.html&amp;quot;, &amp;quot;rb&amp;quot;).read(),&lt;br /&gt;
                   maintype=&amp;quot;text&amp;quot;, subtype=&amp;quot;html&amp;quot;, filename=&amp;quot;report.html&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
with smtplib.SMTP_SSL(&amp;quot;smtp.gmail.com&amp;quot;, 465) as smtp:&lt;br /&gt;
    smtp.login(&amp;quot;me@example.com&amp;quot;, &amp;quot;password&amp;quot;)&lt;br /&gt;
    smtp.send_message(msg)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the whole team gets updates without me lifting a finger.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Automating Browser Tasks With selenium&lt;br /&gt;
Some tasks can’t be done via APIs, but Python can drive the browser.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from selenium import webdriver&lt;br /&gt;
from selenium.webdriver.common.by import By&lt;br /&gt;
&lt;br /&gt;
driver = webdriver.Chrome()&lt;br /&gt;
driver.get(&amp;quot;https://example.com/login&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
driver.find_element(By.ID, &amp;quot;username&amp;quot;).send_keys(&amp;quot;my_username&amp;quot;)&lt;br /&gt;
driver.find_element(By.ID, &amp;quot;password&amp;quot;).send_keys(&amp;quot;my_password&amp;quot;)&lt;br /&gt;
driver.find_element(By.ID, &amp;quot;login-btn&amp;quot;).click()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Whether it’s scraping data or automating form submissions, selenium is the Swiss army knife for browser automation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Scheduling Everything With schedule&lt;br /&gt;
Automation is only useful if it runs without you.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import schedule&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
def job():&lt;br /&gt;
    print(&amp;quot;Running weekly automation...&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
schedule.every().monday.at(&amp;quot;09:00&amp;quot;).do(job)&lt;br /&gt;
&lt;br /&gt;
while True:&lt;br /&gt;
    schedule.run_pending()&lt;br /&gt;
    time.sleep(1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now scripts execute themselves at the right time — no manual triggers needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Organizing PDFs With PyPDF2&lt;br /&gt;
Messy PDFs? Python can merge, split, and reorganize them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from PyPDF2 import PdfMerger&lt;br /&gt;
&lt;br /&gt;
merger = PdfMerger()&lt;br /&gt;
merger.append(&amp;quot;report1.pdf&amp;quot;)&lt;br /&gt;
merger.append(&amp;quot;report2.pdf&amp;quot;)&lt;br /&gt;
merger.write(&amp;quot;merged_report.pdf&amp;quot;)&lt;br /&gt;
merger.close()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of clicking through Adobe menus, this runs in one command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. Scaling Automations With fastapi&lt;br /&gt;
When coworkers kept asking me for the same scripts, I turned them into APIs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from fastapi import FastAPI&lt;br /&gt;
&lt;br /&gt;
app = FastAPI()&lt;br /&gt;
&lt;br /&gt;
@app.get(&amp;quot;/clean-data&amp;quot;)&lt;br /&gt;
def clean_data():&lt;br /&gt;
    return {&amp;quot;status&amp;quot;: &amp;quot;success&amp;quot;, &amp;quot;message&amp;quot;: &amp;quot;Data cleaned!&amp;quot;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now anyone in the company can trigger my automation with a simple API call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wrapping Up&lt;br /&gt;
Python is the closest thing I’ve found to a workplace superpower. The libraries I’ve shown — os, pandas, matplotlib, jinja2, smtplib, selenium, schedule, PyPDF2, and fastapi—are all simple, but together they turn manual drudgery into automated workflows.&lt;br /&gt;
Automation doesn’t just save time. It creates space for deeper, creative work. And once you taste that freedom, you never want to go back.&lt;br /&gt;
&lt;br /&gt;
Read the full article here: https://medium.com/codetodeploy/automating-my-workflow-with-python-f81ae46ae14b&lt;/div&gt;</summary>
		<author><name>PC</name></author>
	</entry>
</feed>