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
Sebastián Ramírez
October 10, 2022
Technology
440
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CLI apps with Typer - Python type annotations and shell completion
Sebastián Ramírez
October 10, 2022
More Decks by Sebastián Ramírez
See All by Sebastián Ramírez
What's new in FastAPI for AI
tiangolo
0
750
2025-10 PyCon Brasil keynote - Behind the scenes of FastAPI and friends for developers and builders
tiangolo
0
34
PyCon Taiwan Keynote - Behind the scenes of FastAPI and friends for developers and builders
tiangolo
0
240
Modern Python through FastAPI and friends - PyCon Sweden
tiangolo
0
81
Await for it: mixing async and blocking code - PyCon MEA - Dubai
tiangolo
0
72
Intro to FastAPI: Tips and Tricks for ML
tiangolo
1
400
Modern Python through FastAPI and friends - PyCon MEA - Dubai
tiangolo
0
910
Software de Colombia para el mundo
tiangolo
1
1.8k
Modern Python through FastAPI and friends - PyCon Indonesia
tiangolo
0
520
Other Decks in Technology
See All in Technology
Head First モブプログラミング / Head First Mobprogramming
takaking22
10
12k
SmartHR Engineering Team Deck
smarthr
1
2.1k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
DatadogのBits Chatが開発組織にもたらしたもの / What Bits Chat Has Brought Us
sms_tech
1
270
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
260
Webアクセシビリティ入門 2026
recruitengineers
PRO
3
570
AIエージェントを前提としたプラットフォーム エンジニアリング:GKEで作るAgent-Ready Golden Path
legalontechnologies
PRO
2
240
AIペネトレーションテスト・ セキュリティ検証「AgenticSec」紹介資料
laysakura
2
9k
Model Studio CLI × Token Plan
maigo999
0
180
オートロックマンションなのに、各部屋は施錠なし!? 攻撃者が組織内ネットワークで大暴れする理由 / The Front Door Is Locked, but the Rooms Are Wide Open: Why Attackers Move Freely Inside Enterprise Networks
nttcom
1
5.8k
MIRU 2026 チュートリアル
keisuke198619
0
910
ガバメント AI 源内を地方自治体は活用できるのか可能性と課題、期待について
takeda_h
1
410
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
119
120k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
[SF Ruby Conf 2025] Rails X
palkan
2
1.3k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
450
For a Future-Friendly Web
brad_frost
183
10k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
230
Evolving SEO for Evolving Search Engines
ryanjones
0
250
Darren the Foodie - Storyboard
khoart
PRO
3
3.6k
Making the Leap to Tech Lead
cromwellryan
135
10k
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