Common Standard Library Modules (No Install Required)
These modules are built into Python and do not need to be installed.
They are available automatically in every Python environment.
Note: These modules are part of the Python Standard Library.
Do not add them to pyproject.toml or requirements.txt.
Data Handling
| Module |
Purpose |
json |
Handle JSON data (read, write, serialize). |
csv |
Read and write CSV files. |
sqlite3 |
Work with SQLite databases (included with Python). |
Filesystem and System Access
| Module |
Purpose |
pathlib |
Work with filesystem paths using object-oriented syntax. |
os |
Interact with the operating system (file paths, environment variables). |
sys |
Access system-specific parameters and functions. |
urllib |
Basic URL handling and data fetching (useful with or without requests). |
Mathematics and Randomness
| Module |
Purpose |
math |
Mathematical functions (sqrt, log, etc.). |
statistics |
Basic statistics (mean, median, stdev). |
random |
Generate random numbers. |
time |
Time-based functions (sleep, timing). |
datetime |
Date and time manipulation. |
Logging and Pattern Matching
| Module |
Purpose |
logging |
Structured and configurable logging. |
re |
Regular expressions and pattern matching. |
pprint |
Pretty-print complex or nested data structures. |
Advanced Containers and Typing
| Module |
Purpose |
collections |
Specialized containers (Counter, defaultdict, etc.). |
typing |
Type hints and static type checking. |
Testing (Modern Context)
While Python includes unittest by default,
most modern projects use pytest (a third-party tool) for its simplicity and better reporting.
pytest is not part of the standard library and must be installed separately.