Flask getting started | Introduction to Flask – Install and Create a Hello World app in Flask

Опубликовано: 28 Сентябрь 2024
на канале: Bytecode Velocity
3,310
24

Let's Build a Community of Programmers.
Subscribe Here👉 : https://goo.gl/HhwC5i​

In this article, I am going to explain what a REST API is all about and how to get started with creating APIs in Python using Flask. In the recent software world, REST APIs play a major role as a communication channel between different services. It has become the de facto standard of passing information across multiple systems in the JSON format. This is because it has a uniform interface to share messages across two different systems. Let us learn more about REST APIs in this article.

What is a REST API?
REST stands for Representational State Transfer which means when a client machine places a request to obtain information about resources from a server, the server machine then transfers the current state of the resource back to the client machine.

As you can see in the figure above, the client machine is just your PC from where you can request data from a database server, and all the communication is done over the REST APIs. There are a few methods in this which are as follows.

GET – Used by the client to select or retrieve data from the server
POST – Used by the client to send or write data to the server
PUT – Used by the client to update existing data on the server
DELETE – Used by the client to delete existing data on the server

#python #flask #webservice