| HTTP / REST | httpx2 (HTTP/2; the new Pydantic-org successor to httpx) or httpx | requests |
| JSON | orjson (fast, correct, bytes) | json stdlib for hot paths |
| TOML | rtoml | tomllib, tomli |
| YAML | ruamel.yaml (round-trips comments) | PyYAML |
| XML | lxml (XPath, schema validation, fast C parser) | xml.etree, minidom, xmltodict |
| Structured data (pure / internal layers) | dataclasses (stdlib, lightweight; trusted internal data) | bare dict, attrs, hand-rolled classes |
| Structured data at boundaries (parse input) | pydantic (validates + parses untrusted input at the edge) | bare dict, attrs, hand-rolled parsing |
| Enums | IntEnum / StrEnum | plain Enum, magic strings |
| Terminal output | rich | colorama (fallback only) |
| TUI | textual | curses |
| Paths | pathlib.Path | os.path |
| Date / time | stdlib datetime + zoneinfo (tz-aware) | pytz, naive datetimes |
| Compression (streaming / web / high speed) | isal (igzip) - speed tuned, bigger files | gzip stdlib for throughput |
| Compression (archival, high ratio) | deflate (libdeflate bindings, high ratio, smaller files, C-extension dependency) | gzip stdlib |
| .env files | python-dotenv | manual parsing |
| Database (ODBC) | pyodbc | raw ODBC bindings |
| Database (MySQL) | mysql-connector-python or SQLAlchemy | PyMySQL, mysqlclient |
| ORM / complex queries | SQLAlchemy | custom ORM, raw SQL for complex apps |
| Testing | pytest | unittest |
| Type checking | mypy | none |
| CLI args / parsing | rich-click (Click-based, rich-formatted --help; drop-in for click) | argparse, optparse, getopt, bare click |
| Subprocess | subprocess.run([...]) (argv list) | os.system, shell=True |
| PowerShell / Windows + OS admin objects | pwshpy (typed records + lazy pipeline over native OS bindings, real exceptions, memory-bounded; use over the Subprocess row when the job is querying/mutating OS objects - services, registry, event log, ACLs, tasks, accounts - not launching a program; see bitranox:coding-python-pwshpy) | shelling out to pwsh.exe / powershell / wevtutil / sc; raw pywin32 / wmi + manual text parsing |
| Retry / backoff | tenacity (declarative retry, exponential backoff + jitter; see bitranox:coding-resilience) | hand-rolled while/sleep retry loops |
| .gitignore parse / file filtering | igittigitt (git-exact, include mode, memory-bounded; see bitranox:coding-python-gitignore) | hand-rolled fnmatch/glob/re; gitignore_parser; pathspec |
| Text encoding / mojibake repair | ftfy (repairs mixed / double-encoded mojibake, e.g. ü->ü; leaves already-correct text untouched) | blanket .encode('latin-1').decode('utf-8') round-trips; manual char swaps |
| MCP server / client (Model Context Protocol) | fastmcp (decorator API for tools/resources/prompts plus auth, server composition, proxying, OpenAPI generation, built-in testing) | hand-rolled JSON-RPC; the official mcp SDK's low-level server API and its bundled mcp.server.fastmcp (frozen 1.0 feature set) |
| Layered / cross-platform app config | lib_layered_config (merges defaults/app/host/user/.env/env into one immutable object with per-key provenance and profiles; resolves Linux/macOS/Windows paths; library + CLI; see bitranox:coding-python-layered-config) | ad-hoc os.environ reads plus scattered file loads with hand-rolled precedence |