Q1Which standard library do you use to verify the integrity of a downloaded file?
Python Standard Library Wrap-Up — 17 Modules Across 7 Categories
Survey 17 standard library modules across 7 categories, plus the judgment criteria for switching to external libraries — urllib→requests, csv→pandas, math→NumPy, unittest→pytest.
The big picture — 17 standard library modules
Python's standard library is the set of modules built into Python — no install required. This series covered 17 of the most useful ones. We started with pulling info from the runtime environment and worked up the abstraction ladder through numbers, strings, data I/O, data structures, ops, and concurrency.
Articles by category
Here's the article list for each category, with the kinds of problems each one solves.
| Category | Articles | Typical problems it solves |
|---|---|---|
| Runtime and files | sys-argparse / os-pathlib / shutil-tempfile | CLI arguments, path manipulation, bulk file operations |
| Numbers / dates / random | datetime-time / math-statistics / decimal-fractions / random-secrets | Date math, exact monetary calculations, random numbers and tokens |
| Strings / text | re / string-textwrap / pprint | Regex, template substitution, pretty-printing |
| Data I/O | json-csv / pickle-base64 / hashlib | Structured data, serialization, encoding, hashing |
| Data structure extensions | collections / itertools-functools / enum-dataclasses | Aggregation, combinations, function tweaks, named constants, data classes |
| Resource mgmt / ops | contextlib / logging | Custom with blocks, logging |
| Concurrency / parallelism | asyncio-basics / asyncio-tasks / threading-multiprocessing | Concurrent execution, parallel computation, calling external commands |
What's an external library?
External libraries are packages that don't ship with Python — you install them with pip install <library>. They tend to be specialized for specific use cases like web frameworks, data analysis, and machine learning, and are published by communities or companies.
import and you're ready to go. External library is a specialized package you install with pip install first, then import like any other module.Standard library and external library — how they relate
The standard library is your first stop, but for larger projects there are areas where external libraries are simply easier to work with. Pick up the concepts in the standard library first, then move outward — the design ideas carry over (pandas extends csv, requests is a friendlier urllib.request, pytest is unittest's improved cousin), so the learning curve flattens.
External libraries by use case
Once the standard library is solid, pull in external libraries that match your goals. Each domain has its go-to library, so picking one representative and starting to use it is the fastest path forward.
Knowledge Check
Answer each question one by one.
Q2What's the most concise way to count how many times each element appears in a list?
Q3When you need to go beyond what csv can handle and do serious data analysis, which external library is the standard pick?