Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
DevOpsPorto Meetup 38: Intro to FastAPI by Sebastián Ramírez
DevOpsPorto
August 06, 2020
Technology
0
59
DevOpsPorto Meetup 38: Intro to FastAPI by Sebastián Ramírez
DevOpsPorto
August 06, 2020
Tweet
Share
More Decks by DevOpsPorto
See All by DevOpsPorto
devopsporto
0
21
devopsporto
0
14
devopsporto
0
12
devopsporto
0
19
devopsporto
0
25
devopsporto
0
58
devopsporto
0
31
devopsporto
0
15
devopsporto
0
17
Other Decks in Technology
See All in Technology
kateinoigakukun
0
120
finengine
0
250
kota2and3kan
2
320
hmatsu47
1
170
kaga
0
290
comucal
PRO
0
300
ymatsuwitter
0
230
finengine
0
340
line_developers
PRO
2
450
fortkle
1
470
kazeburo
1
120
akabekobeko
0
160
Featured
See All Featured
reverentgeek
167
7.3k
wjessup
340
16k
sugarenia
233
880k
colly
66
3k
chriscoyier
683
180k
jnunemaker
PRO
40
4.7k
keavy
107
14k
chriscoyier
498
130k
tanoku
259
24k
hannesfritz
29
980
jakevdp
776
200k
jasonvnalue
81
8.1k
Transcript
Intro to High performance, easy to learn, fast to code,
ready for production
Who am I? Sebastián Ramírez github.com/tiangolo linkedin.com/in/tiangolo twitter.com/tiangolo Dev at
Explosion Berlin, Germany Explosion created: I created: tiangolo.com
About FastAPI • 19K GitHub stars (about 1K+ per month)
• Used by Microsoft, Uber, Netflix, etc. • Performance in the top rank for Python @tiangolo
Based on standards • OpenAPI • JSON Schema • OAuth2
✨ Automatic API docs ✨ @tiangolo
Based on standards - for free @tiangolo
Based on Python type hints • Autocompletion everywhere • Type
checks and type errors @tiangolo
Types provide autocompletion @tiangolo
Easy and short @tiangolo
Less API code @tiangolo
Basic FastAPI app @tiangolo https://somedomain.com/items/5?q=some+query
Basic FastAPI app - docs @tiangolo https://somedomain.com/docs
Automatic docs @tiangolo
Basic FastAPI app with body @tiangolo
Basic FastAPI app with body - docs @tiangolo
Basic FastAPI app with body - docs @tiangolo
Basic FastAPI app with body @tiangolo
Basic FastAPI app with body and query @tiangolo
Basic FastAPI app with body and query - docs @tiangolo
https://somedomain.com/food/?delivery=true
Basic FastAPI app with body and query @tiangolo
JSON array of objects in body @tiangolo
JSON array of objects in body - docs @tiangolo
JSON array of objects in body @tiangolo
JSON array of objects in body - invalid data @tiangolo
JSON array of objects in body - validation @tiangolo
JSON array of objects in body - validation @tiangolo
FastAPI auto-completion @tiangolo
Type checks @tiangolo
All based on standard Python types @tiangolo
Metadata @tiangolo
Metadata in docs @tiangolo
Metadata in docs @tiangolo
Required query @tiangolo
Required query in docs @tiangolo
Required query validation @tiangolo
Required query in docs - valid @tiangolo https://somedomain.com/food/?quantity=2
Required query in docs - response @tiangolo
Required query in docs @tiangolo
Validation @tiangolo
Validation in docs @tiangolo
Validation in docs - response @tiangolo
Data validation @tiangolo
FastAPI - Performance @tiangolo
FastAPI - Performance @tiangolo
FastAPI - Other features @tiangolo • Dependency Injection • Security
- OAuth2 • WebSockets • Files • Background Tasks • Easy GraphQL integration • More...
FastAPI - When not to @tiangolo • Stable • No
new features • Not an API
Other tools @tiangolo Build great CLIs. Easy to code. Based
on Python type hints. Functional deep learning with types, compatible with your favorite libraries. typer.tiangolo.com thinc.ai
Thank you! Sebastián Ramírez github.com/tiangolo linkedin.com/in/tiangolo twitter.com/tiangolo tiangolo.com Questions? fastapi.tiangolo.com