
https://www.amazon.com/Python-Standard-Library-Nutshell-Handbooks/dp/0596000960
Python Standard Library Overview
| |
Python Standard Library Cheatsheet
| Module | Common Functions/Classes | Description |
|---|---|---|
os | os.path, os.system(), os.environ, os.mkdir() | Operating system interfaces |
sys | sys.argv, sys.path, sys.modules, sys.exit() | System-specific parameters and functions |
datetime | datetime.datetime, datetime.date, datetime.time, datetime.timedelta | Date and time manipulation |
json | json.load(), json.dump(), json.loads(), json.dumps() | JSON serialization and deserialization |
re | re.compile(), re.search(), re.match(), re.findall(), re.sub() | Regular expression operations |
math | math.sqrt(), math.sin(), math.cos(), math.pi, math.log() | Mathematical functions |
collections | collections.Counter, collections.defaultdict, collections.namedtuple | Container datatypes |
itertools | itertools.chain(), itertools.cycle(), itertools.permutations(), itertools.combinations() | Functions creating iterators |
random | random.random(), random.randint(), random.choice(), random.shuffle() | Generating random numbers |
string | string.ascii_letters, string.digits, string.punctuation | Common string operations and constants |
urllib | urllib.request, urllib.parse, urllib.error | URL handling modules |
subprocess | subprocess.run(), subprocess.Popen(), subprocess.call() | Subprocess management |
shutil | shutil.copy(), shutil.move(), shutil.rmtree(), shutil.disk_usage() | High-level file operations |
logging | logging.basicConfig(), logging.debug(), logging.info(), logging.error() | Logging facility for Python |
configparser | configparser.ConfigParser(), configparser.read(), configparser.get() | Configuration file parser |
socket | socket.socket(), socket.bind(), socket.listen(), socket.accept() | Low-level networking interface |
threading | threading.Thread(), threading.Lock(), threading.Event(), threading.Timer() | Thread-based parallelism |