Sometimes the smallest Python libraries make the biggest impact. These tools are lightweight, beginner-friendly, and can instantly level up your scripts. Whether youβre automating, debugging, or just having funβthese gems will feel like magic.
1. Rich β Beautiful Terminal Output
π¦ pip install rich
from rich.console import Console
console = Console()
console.print("[bold magenta]Hello Magic![/bold magenta]")
π Add colors, tables, progress bars, even Markdown in your terminal.
2. tqdm β Effortless Progress Bars
π¦ pip install tqdm
from tqdm import tqdm
for i in tqdm(range(1000000)):
pass
π Turns boring loops into elegant progress bars.
3. Fire β Auto CLI from Any Function
π¦ pip install fire
import fire
def greet(name="world"):
return f"Hello {name}!"
if __name__ == "__main__":
fire.Fire(greet)
π Run: python script.py --name=Alice
4. Loguru β Logging Made Simple
π¦ pip install loguru
from loguru import logger
logger.info("This feels magical!")
π One-line setup, beautiful logs.
5. Schedule β Human-Friendly Task Scheduling
π¦ pip install schedule
import schedule, time
def job(): print("Magic every 5s")
schedule.every(5).seconds.do(job)
while True:
schedule.run_pending()
time.sleep(1)
π Write βjobsβ like plain English.
6. Pyperclip β Clipboard Wizardry
π¦ pip install pyperclip
import pyperclip
pyperclip.copy("Copied text!")
print(pyperclip.paste())
π Copyβpaste with one line
7. Halo β Fancy CLI Spinners
π¦ pip install halo
from halo import Halo
spinner = Halo(text='Loading', spinner='dots')
spinner.start()
import time; time.sleep(2)
spinner.succeed("Done!")
π Adds professional-looking spinners to scripts.
8. IceCream β Sweet Debugging
π¦ pip install icecream
from icecream import ic
x = 42
ic(x) # ic| x: 42
π Cleaner, faster debugging than print().
9. Typer β The Fun CLI Builder
π¦ pip install typer
import typer
def hello(name: str):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(hello)
π Build modern, user-friendly CLIs in minutes.
10. Humanize β Numbers & Dates Made Friendly
π¦ pip install humanize
import humanize, datetime
print(humanize.intcomma(1234567))
print(humanize.naturaltime(datetime.timedelta(seconds=3600)))
π Turns 1234567 into 1,234,567 and 3600s into an hour ago.
β¨ Wrapping Up
These tiny tools can save you time, clean up your code, and make Python more enjoyable. I use them in side projects, debugging, and even to make my scripts look more professional β and they always feel like magic.
β Got a favorite Python tool I missed? Or questions about the ones above?
π¬ Share in the comments β Iβd love to hear your picks and maybe feature them in a future post!
Top comments (2)
Very Detailed Guide..!! Really enjoyed reading this article
Thanks a lot! Happy to hear you liked it π