How can we set up a way to communicate from one software instance to another? It sounds simple, and — to be completely honest — it is.
All we need is an API.
An API (Application Programming Interface) is a simple interface that defines the types of requests (demands/questions, etc.) that can be made, how they are made, and how they are processed.
In our case, we will be building an API that allows us to send a range of GET/POST/PUT/PATCH/DELETE requests (more on this later), to different endpoints, and return or modify data connected to our API.
We will be using the Flask framework to create our API and Postman to test it. In short, we will cover:
- Setup
- Our Toy Data
- Initialize a Flask API
- Endpoints
- Running a Local Server
- Writing Our API
- GET
- POST
- 401 Unauthorized
- PUT
- DELETE
- Users Class (summary)
- That's It!
Top comments (0)