Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CLI apps with Typer - Python type annotations a...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Sebastián Ramírez
October 10, 2022
Technology
470
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
Transcript
43 slides
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
More Decks by Sebastián Ramírez
See All by Sebastián Ramírez
FastAPI and All the Things
tiangolo
0
59
FastAPI and Friends: Big Plans
tiangolo
0
35
What's new in FastAPI for AI
tiangolo
0
780
2025-10 PyCon Brasil keynote - Behind the scenes of FastAPI and friends for developers and builders
tiangolo
0
39
PyCon Taiwan Keynote - Behind the scenes of FastAPI and friends for developers and builders
tiangolo
0
300
Modern Python through FastAPI and friends - PyCon Sweden
tiangolo
0
100
Await for it: mixing async and blocking code - PyCon MEA - Dubai
tiangolo
0
89
Intro to FastAPI: Tips and Tricks for ML
tiangolo
1
430
Modern Python through FastAPI and friends - PyCon MEA - Dubai
tiangolo
0
920
Other Decks in Technology
See All in Technology
Bots in Kiro Crew (One point of contact for ongoing work) | Kiro: Zero to Hero 12
inariku
PRO
1
130
AWS Quick 入門 | 目指せ Quick マスター 01
inariku
PRO
2
330
MCPでAIが自分で調べに行く
cdataj
0
160
Context Ontology Accelerator 入門 (業務データの意味を、AI エージェントに渡す)
inariku
PRO
3
660
田んぼの見回りをIoTで減らしたい!水位監視から電池駆動カメラまでの試行錯誤
itosoft
1
120
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
17
120k
Sonnetだけで業務はまわる?
kintotechdev
1
110
うちなーぐちが認識できるなら、秋田弁もいけるはず!? Amazon Transcribe方言チューニング検証
ryouto715
1
170
AWSを利用する上で知っておきたい名前解決の話 2026
nagisa53
5
3.5k
DevOps Agentにあらゆるセキュリティインシデントのトリアージを任せた件
jirtosterone
1
120
【Oracle AI SPOTLIGHT ウェビナー】【特別開催:日本語で解説!】Oracle AI World 2026 最新情報フィードバック
oracle4engineer
PRO
1
190
田んぼから始まる挑戦 〜新米農家の1年目〜
miu_crescent
PRO
0
130
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
350
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Fireside Chat
paigeccino
43
4.1k
ラッコキーワード サービス紹介資料
rakko
5
5.8M
Become a Pro
speakerdeck
PRO
31
6.4k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
330
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
121
130k
Designing Experiences People Love
moore
143
24k
The Pragmatic Product Professional
lauravandoore
37
7.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k