Intro to Building APIs: Software Engineering 13 Phase 4 Hybrid

Learning Goals


Key Vocab


Introduction

In the previous module, we learned about APIs. Prior to starting at Flatiron, you probably only used the internet for browsing, shopping, various productivity tasks, and so on. Now that you're building applications, APIs allow you to greatly expand their functionality without having to rebuild Facebook or Google Maps on your own. You've learned a bit about consuming APIs (accessing their resources); now it's time to build your own.

Flask is an ideal tool for building APIs. Because APIs are meant to provide a means of communication between machines, we don't need to get too fussy with appearances. Being a microframework, Flask doesn't include too many requirements for your frontend or your backend- you can quickly expose a database's resources on the internet with minimal configuration. Flask also makes it easy to specify which HTTP request methods each resource accepts: if you want a page to be readable but not modifiable, you can specify that the only acceptable method is GET. If you want to make a resource modifiable but not removable, you can specify that it does not accept DELETE requests.

All this being said, Flask being a microframework does not prevent you from making a beautiful frontend. In fact, it plays so nice with other frameworks that you don't even have to build your frontend with Python!

In this module you will:


Resources

Powered by Forestry.md