There are plenty of automation tools today that promise results without writing a single line of code, but they come with limits. You’re usually locked into the templates and workflows the platform decides to offer. Tools like n8n give you more flexibility and let you drop in custom code, but once I’m doing that, I’d rather just build the automation myself in Python.
Python gives you far more control, and the ecosystem is stacked with libraries that can replace most no-code platforms if you’re willing to write a bit of code. Over time, I’ve realized that the biggest productivity gains don’t come from building massive systems, but from choosing the right libraries that remove friction from everyday tasks.
Pathlib
Work with Path objects
Python’s built-in pathlib module brings file and folder handling into the 21st century. Instead of messing with strings and os.path, you work with Path objects. This means you can use pathlib to read, write, move, and delete files in a clean, intuitive way. For example, I can easily loop through all the .txt files in a folder and move them to an archive folder with just one or two method calls. It works the same on Windows, Mac, or Linux, so I don’t worry about mixed-up slashes or bad paths. I’ve used pathlib to automate organizing my downloads by file type and to back up logs every week. It’s a game-changer because all file-path operations are unified under one toolbox.
Playwright
Automation tool to control web browsers
Playwright is an open-source automation framework from Microsoft that lets you control web browsers using code. You can automate Chrome, Firefox, and WebKit, which makes it useful for testing websites, scraping data, or handling repetitive browser tasks. It works well with modern sites, including single-page apps, dynamic content, and shadow DOM, so you are not fighting the browser when things get complex.
What makes Playwright stand out is how much control you get. You can run scripts headlessly for speed, test the same flow across multiple browsers, capture screenshots and videos, and inspect network traffic when something breaks. Clicking buttons, filling forms, navigating pages, and extracting data all feel predictable and reliable. And because everything runs locally without third-party AI in the loop, you keep full control over your data and your automation.
Pandas
Deal with data easily
I love pandas, both the animal and the Python library, though probably the latter more than the former. If you’re automating any business or even personal workflows, you’ll almost always end up dealing with data, and you already know how painful that can get. Pandas (the Python library, of course) exists to make that part easier.
It’s a powerful Python library designed for working with structured and semi-structured data. At its core, it introduces easy-to-use data structures like DataFrames and Series, which let you think in rows and columns instead of low-level arrays and loops. You can load data from CSVs, Excel files, JSON, SQL databases, or APIs and start exploring it almost immediately.
Pandas really earns its place when you need to clean and reshape messy data. You can filter and sort rows, rename columns, handle missing values, change data types, and combine multiple datasets using joins and merges. It also makes time-based data much easier to work with, whether you’re resampling logs, analyzing trends, or grouping data by date ranges.
On top of that, pandas comes with built-in tools for aggregation and analysis. You can calculate averages, totals, percent changes, and custom metrics without writing complex logic. It integrates cleanly with libraries like NumPy, Matplotlib, and scikit-learn, which means it fits naturally into data analysis, automation scripts, and reporting pipelines.
Pdfminer
PDFs don't have to be a pain
PDF files can be a pain when you need text out of them, and pdfminer solves exactly that. It’s a Python package for extracting information from PDF documents. It parses the contents of a PDF and returns the text, while handling fonts, columns, and layout.
I often use it to batch-process PDFs. For example, I once had a stack of scanned invoices and needed the text inside them for accounting. With pdfminer, I wrote a script that opened each PDF, extracted all the text, and wrote it to a file. What used to mean endless copy-pasting or using a clunky GUI turned into a simple script. You could upload PDFs to an AI chatbot like ChatGPT or Claude and ask for the text, but I find it hard to trust the output. I’d also rather not share my finances with big tech.
PyAutoGUI
Automate mouse clicks
PyAutoGUI is like giving your script a virtual mouse and keyboard. It’s a cross-platform GUI automation library that can move the mouse, click, scroll, type, and even take screenshots. I use PyAutoGUI when there’s no API or library for a task, but a visual interface exists. For example, you can use it to batch-process images with a desktop photo editor that only has a GUI. With PyAutoGUI, your script can open the editor, click through menu items, apply a filter, and save the result, all by itself. Essentially, if you can do something by hand with a mouse and keyboard, PyAutoGUI can do it in code.
It also supports image recognition, which means your script can wait until a specific button or window appears on the screen before continuing. The real game-changer is that PyAutoGUI can automate almost any app on your computer, making it easy to script repetitive clicks and keystrokes without ever touching the keyboard.
Automate better with Python
Even if you only know basic Python, you can automate a surprising number of tasks that would otherwise eat up your time. I recently automated my entire morning routine with a single script, and it’s been saving me more time than I expected. Once you start doing this, it’s hard to stop. If you’re looking for inspiration, check out these tiny Python scripts that can save you hours every week. You can also install a few VS Code extensions to make writing and running Python code much easier.
5 Python libraries to extend Excel’s capabilities
Python libraries that supercharge Excel
