FastAPI - REST Architecture



RElational State Transfer (REST) is a software architectural style. REST defines how the architecture of a web application should behave. It is a resource based architecture where everything that the REST server hosts, (a file, an image, or a row in a table of a database), is a resource, having many representations.

REST recommends certain architectural constraints.

  • Uniform interface

  • Statelessness

  • Client-server

  • Cacheability

  • Layered system

  • Code on demand

REST constraints has the following advantages −

  • Scalability

  • Simplicity

  • Modifiability

  • Reliability

  • Portability

  • Visibility

REST uses HTTP verbs or methods for the operation on the resources. The POST, GET, PUT and DELETE methods perform respectively CREATE, READ, UPDATE and DELETE operations respectively.

Advertisements