Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CLI apps with Typer - Python type annotations a...

CLI apps with Typer - Python type annotations and shell completion

Avatar for Sebastián Ramírez

Sebastián Ramírez

October 10, 2022
Tweet

More Decks by Sebastián Ramírez

Other Decks in Technology

Transcript

  1. Who am I? Sebastián Ramírez github.com/tiangolo linkedin.com/in/tiangolo twitter.com/tiangolo tiangolo.com Berlin,

    Germany Senior Staff Software Engineer at I created: ➕ External Consultant for other teams
  2. Command Line Interfaces (CLI) or Terminals @tiangolo • Text based

    • You send program and parameters • Computer goes beep boop • Maybe output • Examples of CLI apps: git, ssh, pip
  3. Completion @tiangolo 🧙 Works by default and can be used

    for: • Deeply nested commands • CLI Options and CLI Arguments • Custom data (e.g. remote, from an API) • etc.
  4. More Typer features @tiangolo • 🥅 Boolean flags • ❓

    Prompts • 🔒 Ask passwords • 🚀 Launch apps (e.g. a browser) • ✅ Easy testing • ✨ More…