DEV Community

Cover image for What is one Python library you wish you had discovered earlier in your coding journey?
Alex Mercer
Alex Mercer

Posted on

What is one Python library you wish you had discovered earlier in your coding journey?

When you first start building automation scripts or backend utilities in Python, it is easy to spend hours writing custom boilerplate code for problems that a lightweight library already solves in three lines.

For me, discovering rich (for clean terminal tables and progress bars) and pathlib (instead of messy os.path string joins) completely changed how fast I write daily scripts.

A Quick Example with pathlib

Instead of chaining os.path.join() everywhere, handling files becomes readable and cross-platform:

from pathlib import Path

data_dir = Path("exports") / "2026"
data_dir.mkdir(parents=True, exist_ok=True)

output_file = data_dir / "report.csv"
output_file.write_text("id,status\n1,active\n", encoding="utf-8")
Enter fullscreen mode Exit fullscreen mode

Over to You!

What is one underrated Python package or built-in module that saved you hours of work once you finally started using it?

Drop your recommendations in the comments—I am always looking to add better tools to my workflow!

Top comments (0)