Python typing

Python has robust optional static typing. If you took a break from Python in the mid-2010s like I did, it may come as a surprise. This page links to resources for writing statically-typed Python, plus a few that make use of type hints at runtime.

  • jsonargparse—“Implement minimal boilerplate CLIs derived from type hints and parse from command line, config files and environment variables”
  • Typed Argument Parser (Tap)—“Typed argument parser for Python”
  • Typer—“Typer, build great CLIs. Easy to code. Based on Python type hints.”
  • tyro—“Zero-effort CLI interfaces & config objects, from types”

  • poltergeist—“Rust-like error handling in Python, with type-safety in mind.”