Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CLI apps with Typer - Python type annotations a...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Sebastián Ramírez
October 10, 2022
Technology
0
410
CLI apps with Typer - Python type annotations and shell completion
Sebastián Ramírez
October 10, 2022
Tweet
Share
More Decks by Sebastián Ramírez
See All by Sebastián Ramírez
What's new in FastAPI for AI
tiangolo
0
690
2025-10 PyCon Brasil keynote - Behind the scenes of FastAPI and friends for developers and builders
tiangolo
0
29
PyCon Taiwan Keynote - Behind the scenes of FastAPI and friends for developers and builders
tiangolo
0
200
Modern Python through FastAPI and friends - PyCon Sweden
tiangolo
0
67
Await for it: mixing async and blocking code - PyCon MEA - Dubai
tiangolo
0
50
Intro to FastAPI: Tips and Tricks for ML
tiangolo
1
380
Modern Python through FastAPI and friends - PyCon MEA - Dubai
tiangolo
0
880
Software de Colombia para el mundo
tiangolo
1
1.8k
Modern Python through FastAPI and friends - PyCon Indonesia
tiangolo
0
510
Other Decks in Technology
See All in Technology
AI時代のシステム開発者の仕事_20260328
sengtor
0
310
AI時代のオンプレ-クラウドキャリアチェンジ考
yuu0w0yuu
0
620
OCI技術資料 : ロード・バランサ 概要 - FLB・NLB共通
ocise
4
27k
スケールアップ企業でQA組織が機能し続けるための組織設計と仕組み〜ボトムアップとトップダウンを両輪としたアプローチ〜
qa
0
380
Network Firewall Proxyで 自前プロキシを消し去ることができるのか
gusandayo
0
110
Physical AI on AWS リファレンスアーキテクチャ / Physical AI on AWS Reference Architecture
aws_shota
1
200
韓非子に学ぶAI活用術
tomfook
4
1.2k
パワポ作るマンをMCP Apps化してみた
iwamot
PRO
0
240
The Rise of Browser Automation: AI-Powered Web Interaction in 2026
marcthompson_seo
0
310
Even G2 クイックスタートガイド(日本語版)
vrshinobi1
0
130
AWS Systems Managerのハイブリッドアクティベーションを使用したガバメントクラウド環境の統合管理
toru_kubota
1
190
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
Featured
See All Featured
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
400
WENDY [Excerpt]
tessaabrams
9
37k
Building an army of robots
kneath
306
46k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
430
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
240
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
190
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
800
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Transcript
CLI apps with type annotations and shell completion
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
About Typer • 8K+ GitHub stars • FastAPI's little sibling
• Powered by Click @tiangolo
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
Simple function with type annotations @tiangolo
Simple function with type annotations @tiangolo
Why type annotations - error checks @tiangolo
Why type annotations - completion @tiangolo
Simple function with type annotations - recap @tiangolo
Simple scripts with Typer @tiangolo
Simple scripts - required arguments @tiangolo
Simple scripts with Typer - main block @tiangolo
Simple scripts - required arguments missing @tiangolo
Simple scripts with --help @tiangolo
Simple scripts - options @tiangolo
Simple scripts - invalid data @tiangolo
Simple scripts - more help @tiangolo
Simple scripts - more help in the terminal @tiangolo
Simple scripts - help for parameters @tiangolo
Simple scripts - help for parameters in the terminal @tiangolo
A Typer app @tiangolo
A Typer app - app object @tiangolo
A Typer app - decorator @tiangolo
A Typer app - call the app @tiangolo
A Typer app - supergreet @tiangolo
Install completion @tiangolo ✨ Works for everything: • Zsh •
Bash • Fish • PowerShell
Use completion @tiangolo
Use completion @tiangolo
Use completion @tiangolo
Use completion @tiangolo
Use completion @tiangolo
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.
Commands @tiangolo
Commands - hi @tiangolo
Commands - bye @tiangolo
Help with commands @tiangolo
Commands - hi again @tiangolo
Commands --help for hi @tiangolo
Command hi in terminal @tiangolo
Commands - bye @tiangolo
Commands --help for bye @tiangolo
More Typer features @tiangolo • 🥅 Boolean flags • ❓
Prompts • 🔒 Ask passwords • 🚀 Launch apps (e.g. a browser) • ✅ Easy testing • ✨ More…
Thank you! Sebastián Ramírez tiangolo.com typer.tiangolo.com github.com/tiangolo linkedin.com/in/tiangolo twitter.com/tiangolo