#stdlib

11 pages tagged stdlib.

11/11

typing

Go beyond list[int] and str | None. Covers Protocol, TypeVar bounds, ParamSpec, Concatenate, Self, Annotated, TypedDict with NotRequired/Required, TypeAlias, TypeGuard, TypeIs, cast, assert_type, and reveal_type.

05-25-2026#python#typing#types

subprocess

Run external commands from Python with subprocess. Covers run vs Popen, capture_output, streaming, pipes, timeouts, env/cwd overrides, and shlex quoting safety.

05-25-2026#python#stdlib#shell

re

Python's built-in regex module — compile vs not, match/search/findall/finditer/sub, named groups, lookarounds, verbose mode (re.X), and how it differs from PCRE.

05-25-2026#python#stdlib#regex

pdb

Pause, inspect, and step through Python programs with pdb. Covers breakpoint(), command reference, post-mortem debugging, conditional breakpoints, and enhanced alternatives like ipdb, pdbpp, and pudb.

05-25-2026#python#pdb#debugging

logging

Configure Python's built-in logging module — loggers, handlers, formatters, dictConfig, rotation, structured records, and how it compares to loguru.

05-25-2026#python#stdlib#logging

json

Encode and decode JSON in Python with the stdlib json module. Covers dumps/loads, indent/sort_keys/separators, custom default= and JSONEncoder, object_hook decoding, JSONL streaming, and orjson/ujson/msgspec comparison.

05-25-2026#python#stdlib#json

itertools & functools

The two stdlib modules every Python developer pairs together — iterator algebra (chain, groupby, batched, pairwise) and function plumbing (lru_cache, partial, reduce, singledispatch, cached_property).

05-25-2026#python#stdlib#functional

datetime

Work with dates, times, and timezones in Python using the stdlib datetime module and zoneinfo. Covers aware vs naive datetimes, ISO-8601 parsing, strftime/strptime, timedelta arithmetic, and DST handling.

05-25-2026#python#stdlib#time

dataclasses

Define typed data containers with @dataclass — frozen, slots, kw_only, default_factory, __post_init__, asdict, replace, and how it compares to attrs, pydantic, NamedTuple, TypedDict.

05-25-2026#python#stdlib#typing

argparse

Parse command-line arguments with Python's stdlib argparse module. Covers positional/optional args, subparsers, nargs, validation, mutually exclusive groups, FileType, env-var fallbacks, and argcomplete.

05-25-2026#python#stdlib#cli

pathlib

Work with filesystem paths using Python's built-in pathlib module. Covers Path creation, navigation, reading/writing files, glob patterns, and stat.

04-25-2026#python#pathlib#files