Adding a REST API will enable us to curl for Fizzbuzz from a web endpoint. Once it can run as a service, we can hit from anywhere, i.e. SMS, chatbots, etc.
We should use OpenAPI as it is a common standard and comes with many features out of the box, including self-documenting. The Python library to help us with this should beFastAPI as it is high performance and will check our inputs. (validating user input, especially on the web, is a good way to prevent getting pwned).
Adding a REST API will enable us to
curl
for Fizzbuzz from a web endpoint. Once it can run as a service, we can hit from anywhere, i.e. SMS, chatbots, etc.We should use OpenAPI as it is a common standard and comes with many features out of the box, including self-documenting. The Python library to help us with this should beFastAPI as it is high performance and will check our inputs. (validating user input, especially on the web, is a good way to prevent getting pwned).
Resources to get started: