What’s in the Standard Library?
The standard library is organized into several categories:Core Language Features
- Built-in Functions: Available without importing (
print(),len(),range(), etc.) - Built-in Types: Fundamental data types (
int,str,list,dict, etc.) - Built-in Exceptions: Standard exception hierarchy
Essential Modules
sys
System-specific parameters and functions
os
Operating system interfaces
pathlib
Object-oriented filesystem paths
datetime
Date and time manipulation
Data Structures & Algorithms
collections
Specialized container datatypes
itertools
Iterator building blocks
functools
Higher-order functions and operations
typing
Type hints and annotations
Concurrency & Parallelism
asyncio
Asynchronous I/O and coroutines
threading
Thread-based parallelism
multiprocessing
Process-based parallelism
concurrent.futures
High-level concurrency interface
Text Processing
re
Regular expression operations
string
String operations and formatting
json
JSON encoder and decoder
csv
CSV file reading and writing
File & Data Persistence
io
Core I/O operations
pickle
Python object serialization
sqlite3
SQLite database interface
zipfile
ZIP archive handling
Networking & Internet
socket
Low-level networking interface
http
HTTP modules
urllib
URL handling modules
Email and MIME handling
Library Philosophy
The Python Standard Library follows these principles:Batteries Included
Batteries Included
Python comes with a comprehensive standard library that provides tools for common programming tasks without requiring external dependencies.
Cross-Platform
Cross-Platform
Most standard library modules work consistently across different operating systems, with platform-specific variations clearly documented.
Well-Tested
Well-Tested
All standard library modules are thoroughly tested and maintained by the Python core development team.
Stable APIs
Stable APIs
Standard library APIs are stable and follow strict backward compatibility guidelines.
Getting Started
No installation required! The standard library is included with Python:Common Patterns
File Operations
Date and Time
Data Structures
Concurrency
Next Steps
Built-in Functions
Explore Python’s built-in functions
Built-in Types
Learn about fundamental data types
