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
45
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
18
devopsporto
0
12
devopsporto
0
8
devopsporto
0
11
devopsporto
0
22
devopsporto
0
44
devopsporto
0
27
devopsporto
0
11
devopsporto
0
16
Other Decks in Technology
See All in Technology
chaspy
1
400
i35_267
0
250
fu3ak1
0
550
shoken
0
110
natsusan
0
200
yosuke_matsuura
PRO
0
3.6k
hololab
0
340
clustervr
0
210
kenya888
1
140
yutamakotaro
1
210
terurou
0
180
nkjzm
1
860
Featured
See All Featured
searls
204
35k
nonsquared
81
3.3k
kneath
294
39k
lara
590
61k
yeseniaperezcruz
302
31k
mongodb
23
3.8k
cherdarchuk
71
260k
andyhume
62
3.5k
mthomps
39
2.3k
shlominoach
176
7.4k
samlambert
237
9.9k
hannesfritz
27
930
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