Skip to content

2024

#216: Test Your FastAPI Application

If we do not want to keep starting our API and manually click through the endpoints to see if everything still works, we need to put a little effort into testing. Thanks to the underlying Starlette toolkit, we can test our FastAPI application in-memory and do not need a dedicated server. Let us explore how that helps us with testing our API.

#215: Async & Await

While our application waits on IO (Input / Output), our CPUs idle around. If we would have a way to let the program step aside and let other code run while we wait on a file or a response, we could get more work done at the same time. That is the basic idea behind asynchronous programming that we can do with coroutines and the async and await keywords in Python.

#214: First Steps With FastAPI

There are many projects in Python that we can use to create an API. After exploring a few options, I decided to go with FastAPI and explore it over the next few weeks. FastAPI is not only fast when it comes to serving requests, but also when it comes to writing code for it. Let us explore the many features we can use while we create our API.

#210: Cache Function Calls

If our application uses recursion, we may call the same function with the same values many times. When that function is side-effect free, we can save a lot of time by caching the result. And even better, in Python we can do that without much effort.