This device is not compatible.

PROJECT


Build a REST API in Flask

Build a REST API to perform CRUD operations using the Flask-RESTX extension.

Build a REST API in Flask

You will learn to:

Use Flask-RESTX to create endpoints.

Create endpoints to insert, get, update, and delete records in the database.

Use Flask-SQLAlchemy as the ORM (Object Relational Mapper).

Handle the responses and exceptions of database queries.

Skills

API Development

Backend Development

REST API

Prerequisites

Familiarity with the Flask-RESTX extension

Familiarity with SQLAlchemy

Familiarity with Flask

Technologies

Python

SQLAlchemy

Flask-RESTX

Project Description

In this project, we'll create endpoints to get and display information about different movies using Flask. We'll use the Flask-RESTX extension for REST API development. Flask-RESTX is a Flask extension that adds support for API development. This extension eases the process of API creation by providing different decorators. By default, Flask-RESTX automatically generates the Swagger UI documentation for REST APIs. SQLAlchemy will be used to handle database-related operations.

Our API will consist of the following endpoints:

  • Get all movies

  • Get a movie by its ID

  • Get movies between a particular range of release years

  • Get movies by their titles

  • Post a new movie

  • Update an existing movie

  • Delete a movie

Project Tasks

1

Getting Started

Task 0: Introduction

Task 1: Set Up the Database

Task 2: Create a Model for the Database

Task 3: Register a Flask-RESTX Model

Task 4: Create the Movies Database Table

2

Develop Endpoints for the API

Task 5: Add a New Movie

Task 6: Get a Movie by ID

Task 7: Get Movies Released within a Range of Years

Task 8: Get Movies by Title

Task 9: Retrieve All Movies

Task 10: Update a Movie

Task 11: Delete a Movie

Congratulations!

has successfully completed the Guided ProjectBuild a REST API in Flask

Relevant Courses

Use the following content to review prerequisites or explore specific concepts in detail.