Build REST APIs with FastAPI
1h 11mIntermediate2024-12-17
Authors

Miki Tebeka
CEO at 353Solutions
Course details
FastAPI is a simple, powerful, and fast Python web server. In this course, instructor Miki Tebeka shows you how to use FastAPI to quickly create robust REST API servers and make your server code production ready.
Learning objectives
Use FastAPI to write web servers.
Understand async handlers and their limitations.
Receive, validate, and send data.
Make server code production ready.
Learning objectives
Use FastAPI to write web servers.
Understand async handlers and their limitations.
Receive, validate, and send data.
Make server code production ready.
Skills covered
APIsFull-Stack Web DevelopmentPythonWeb DevelopmentProgramming LanguagesOpen SourceSoftware DevelopmentOne-Off
Concepts
Introduction
- What is FastAPI
- What you should know
- How to work with Codespaces
REST APIs
- What are REST APIs
- The HTTP protocol
- JSON encoding
FastAPI Basics
- Writing handlers
- Running the server
- Async handlers
- Challenge - Info handler
- Solution - Info handler
Accepting Data
- Query parameters
- Request body
- HTML forms
- Raw data
- Challenge - Start and stop a VM
- Solution - Start and stop a VM
Sending Data
- JSON responses
- Streaming responses
- Raw data responses
- Sending errors
- Challenge - Query logs
- Solution - Query logs
Writing Production-Ready Code
- Configuration
- Logging and metrics
- Security
- Working with databases
- Challenge - Make a server production ready
- Solution - Make a server production ready
Conclusion
- What's next