I still remember one late night when I sat down just to "test out" a new Python library. My plan? A quick experiment. My reality? The sun was rising, and I was still typing away, obsessively adding features to a tool I didn't even plan to build. That's what Python does to you, it's not just a language, it's a rabbit hole of endless tinkering.

Over the last four years, I've burned weekends, broken code at 3 a.m., and built more side projects than I care to admit, all because I stumbled on libraries that felt more like cheat codes than tools. They didn't just save me time; they made me want to automate everything.

Here are 12 Python libraries so addictive, I couldn't stop building projects with them.

1. TQDM: Progress Bars That Make You Feel Like a Hacker

There's something satisfying about seeing a progress bar slide across the screen. With tqdm, even the most boring loop feels cinematic.

from tqdm import tqdm
import time

for i in tqdm(range(100)):
    time.sleep(0.05)

I first added tqdm into a file-copying script just for fun. Then I couldn't stop. Every long-running process in my scripts now has a sleek progress bar. It's addictive because it gives instant feedback, and trust me. once you add it, you'll never go back to blind loops.

2. Arrow: Date and Time Without the Pain

I used to dread handling dates in Python. Time zones, formatting, parsing… pure chaos. Then I found arrthe ow.

import arrow

dt = arrow.utcnow()
print(dt.shift(hours=5).format('YYYY-MM-DD HH:mm'))

Suddenly, working with time became effortless. I ended up automating reminders, scheduling backups, and even making a script that auto-renamed files with timestamps. If you've ever fought datetime, arrow feels like a breath of fresh air.

3. Faker: Fake Data That Looks Real

When I built my first Django project, I needed test users. Instead of copy-pasting "John Doe" a hundred times, I discovered faker.

from faker import Faker

fake = Faker()
for _ in range(3):
    print(fake.name(), fake.email())

Next thing I knew, I was filling entire databases with fake addresses, credit cards, and company names. Suddenly, testing wasn't boring anymore, it was fun.

4. Fire: Turn Any Script Into a CLI

I once wrote a script for cleaning up duplicate files on my laptop. Then I wanted a way to run it with different arguments, without editing the code every time. Enter fire.

import fire

def greet(name="World"):
    return f"Hello {name}!"

if __name__ == '__main__':
    fire.Fire(greet)

One line and boom, your script becomes a full command-line tool. That little discovery spiraled into me writing mini-CLIs for all my automation tasks.

5. Playwright Sync: Web Automation Without Tears

Okay, Selenium is powerful, but it made me want to pull my hair out. Then I tried Playwright sync, buttery smooth browser automation.

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page()
    page.goto("https://example.com")
    print(page.title())

I went from frustrated to obsessed. First, it was scraping, then form filling, then testing my own apps. Suddenly, the browser wasn't an obstacle, it was a playground.

6. PyInputPlus: Smarter User Input

Ever built a CLI script where the user kept typing nonsense into your prompts? I did. PyInputPlus fixed that.

import pyinputplus as pyip

age = pyip.inputInt("Enter your age: ", min=1)
print(f"You are {age} years old.")

Instead of writing custom validation, this library does it for you. It sounds small, but it makes CLI tools feel bulletproof.

7. PDFPlumber: PDFs That Actually Cooperate

I once had to extract tables from a 200-page PDF report. Copy-paste? Impossible. Regex? A nightmare. Then I found PDFplumber.

import pdfplumber

with pdfplumber.open("report.pdf") as pdf:
    first_page = pdf.pages[0]
    text = first_page.extract_text()
    print(text)

What started as a one-time project turned into me building PDF search tools, auto-summary scripts, and even invoice analyzers.

8. Tenacity: Retry Until It Works

APIs fail. Networks drop. Without retries, scripts break. With tenacity, retries feel effortless.

from tenacity import retry, stop_after_attempt
import random

@retry(stop=stop_after_attempt(3))
def flaky_task():
    if random.random() < 0.7:
        raise Exception("Failed!")
    return "Success!"

print(flaky_task())

This library saved me during a scraping project where the site would randomly drop connections. Instead of frustration, I just let tenacity handle the retries.

9. IceCream: Debugging That Feels Cool

Print debugging is underrated. But with icecream, it's addictive.

from icecream import ic

x = 42
ic(x * 2)

It prints both the expression and the value. I went from sprinkling print() everywhere to actually enjoying debugging.

10. Schedule: Automate Your Life

I built my first cron replacement with schedule. It's simple, readable, and makes automation scripts a breeze.

import schedule, time

def job():
    print("Running task...")

schedule.every(10).seconds.do(job)

while True:
    schedule.run_pending()
    time.sleep(1)

I started with backups, then reminders, then health checks. Before I knew it, I had mini daemons running on my machine like it was my personal assistant.

11. Humanize: Numbers That Speak Human

Raw numbers are boring. Humanize makes them readable.

import humanize
print(humanize.intcomma(1234567))
print(humanize.naturaltime(3600))

I first used it in a logging script. Suddenly, logs went from cryptic to clear. You don't just see "3600 seconds" you see "an hour ago."

12. PyWhatKit: Automations That Feel Like Magic

Want to send WhatsApp messages from Python? Or play YouTube videos? PyWhatKit does it in one line.

import pywhatkit

pywhatkit.playonyt("Python automation tutorials")

One night I built a script that sent me random productivity quotes on WhatsApp at 9 a.m. every day. It was half joke, half serious, and it worked.

Final Thoughts

These libraries didn't just make me more productive; they made coding feel alive again. Every time I discovered one, I ended up building something I didn't plan to. That's the power of Python: the ecosystem itself pushes you to experiment, to automate, to tinker until you've built something new.

Here's my pro tip: pick one of these libraries tonight and build something dumb with it. Dumb projects have a way of turning into clever ones, and you'll learn more than you expect.

Want more posts like this? Drop a "YES" in the comment, and I'll share more coding tricks like this one.

Want to support me? Give 50 claps on this post and follow me.

Thanks for reading!

A message from our Founder

Hey, Sunil here. I wanted to take a moment to thank you for reading until the end and for being a part of this community.

Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? We don't receive any funding, we do this to support the community. ❤️

If you want to show some love, please take a moment to follow me on LinkedIn, TikTok, Instagram. You can also subscribe to our weekly newsletter.

And before you go, don't forget to clap and follow the writer️!