Standard Library
PronunciationSTAN-derd LY-brer-ee
Definition
The standard library is the set of modules that come with a language, such as json, datetime and pathlib in Python, so you can use them without installing anything.
Where you hear it
In tutorials, when someone asks whether to add a dependency, and in code reviews that prefer built-in tools.
Examples
The standard library already handles JSON, so no extra package is needed.
Check the standard library before adding a dependency.
The standard library has datetime, so we did not need another package for dates.
Common mistake
Installing a package for something the standard library already does well.
Don't confuse with
A third-party library, which you install separately and which can change independently of the language.
Say it at work
- In a meeting or chat
Use
pathlibfrom the standard library instead of adding a package. - In an email or ticket
Fewer dependencies means we stick to the standard library.
Keep exploring
More in Programming Fundamentals