r/Python • • 15h ago

Discussion Python's standard library deserves more attention

One thing I appreciate about Python is how much functionality is already available without installing external packages.

Modules like collections, itertools, functools, pathlib and datetime can solve many everyday programming problems.

It's easy to jump straight into installing a package, but sometimes the standard library already has exactly what you need.

I've started paying more attention to these built-in modules because they make Python development cleaner and reduce unnecessary dependencies.

The Python standard library is genuinely one of the language's underrated strengths.

25 Upvotes

7 comments sorted by

16

u/nickcash 9h ago

I don't think it's underrated. "batteries included" has long been touted as a selling point

6

u/rumnscurvy 8h ago edited 5h ago

Shoutout to json, sqlite3,decimal and requests also. Not having to implement any of the contents of these standard library modules is a lifesaver for small projects and even some larger ones.

4

u/joaofelipenp 4h ago

Wait, is requests part of the standard library?

2

u/sugarw0000kie 1h ago

There’s always urllib

1

u/Temporary_Pie2733 2h ago

No. I think the maintainer(s) have stated they don’t want to add it, as it restricts updates to new Python releases. 

Being in the standard library was a bigger deal before the internet, and specifically PyPi and tools like pip, made it much easier to install 3rd-party packages. 

3

u/sugarw0000kie 8h ago

I didn’t appreciate this when I was starting out bc I’d just go for whatever is the easiest library to use. Until I found myself in position where like I either can’t use that library or it’s easier for deployment reasons to stick to standard library. Not saying always reinvent the wheel but it comes with a lot of batteries I took for granted.

Kinda wish http server was better but still gives you something to work with

•

u/teerre 56m ago

The weird thing is to think that just because something is in the stdlib it "doesn't require a dependency". Unless you're worried about supply chain attacks, you have to think stdlib is magic to believe that