Flask-RESTful: Integrating the API Server with a MySQL Database

Flask-RESTful 1.1.1    |    Expert
  • 17 videos | 2h 5m 30s
  • Includes Assessment
  • Earns a Badge
Rating 4.1 of 17 users Rating 4.1 of 17 users (17)
Learn more about Flask-RESTful, which connects to the ORM libraries you use to connect to your database. You'll set up APIs to perform create, read, update, and delete (CRUD) operations. You'll then implement APIs using an in-memory dictionary before integrating them with a MySQL database back end. You'll set up a MySQL database and work with MySQL Workbench. You'll install and use the Advanced REST Client.

WHAT YOU WILL LEARN

  • Discover the key concepts covered in this course
    Implement a complete api server using flask-restful, which responds to get, post, put, and delete requests
    Test create, read, update, and delete (crud) operations using flask-restful
    Install and set up mysql and mysql workbench on macos
    Install and set up mysql and mysql workbench on windows
    Install the sqlalchemy library, connect to a database, and insert records in the database
    Install the advanced rest client, an api testing tool to test apis and validate responses
    Use the marshal() function, marshal_with, and data_class decorators to serialize an object to json format
    Wire up the methods to add and retrieve data with the mysql database
  • Wire up the method to update data with the mysql database
    Wire up the method to delete data with the mysql database
    Use the envelope parameters to structure the json response to the user
    Configure json responses with special display names
    Specify nested fields and url paths within json responses
    Create custom fields in json responses
    Create custom error messages for specific error handling using mysql database and flask-restful
    Summarize the key concepts covered in this course

IN THIS COURSE

  • 2m 17s
    This course will teach you how to set up APIs to perform create, read, update, and delete (CRUD) operations. You will learn to implement APIs using an In-Memory dictionary, and install and set up the MySQL database.  You will work with the MySQL Workbench and install the FLASK library. You will install and use the advanced REST client to test and validate APIs and wire up your CRUD operations with the MySQL database backend.  FREE ACCESS
  • 9m 44s
    In this course, you will learn to write code for your API server to handle CRUD requests. You will learn how to implement a complete API server using Flask-RESTful. The instructor walks you through the process, step-by-step, as you watch the demo.    FREE ACCESS
  • Locked
    3.  Testing Create, Read, Update, and Delete Operations
    9m 16s
    In this video, you will make sure your requests and responses work as expected. You'll make sure your FLASK server is up and running. The instructor will walk you through each step, providing a demo.  You'll learn how to view and read response headers, as well.  FREE ACCESS
  • Locked
    4.  Installing MySQL and MySQL Workbench on macOS
    9m 48s
    In this video, you will follow a demo for users on macOS. In this demo, you've installed the MySQL server and the MySQL workbench graphical user interface on the local machine. The demo will show you how to use this database to write out your data.  FREE ACCESS
  • Locked
    5.  Installing MySQL and MySQL Workbench on Windows
    8m 13s
    In this video, you will follow a demo for users on Windows. In this demo, you've installed the MySQL server and the MySQL workbench graphical user interface on the local machine. The demo will show you how to use this database to write out your data.  FREE ACCESS
  • Locked
    6.  Creating Tables Using SQLAlchemy
    10m 42s
    In this video, you will watch a demo showing you how to set up your environment so your API server can connect to the MySQL database. First, you'll learn to install the MySQL connector Python.  The Python library you will use is SQLAlchemy. You'll also learn to install FLASK-SQLAlchemy.  Next, you'll learn to run a script to create the table you'll be working with. You'll learn more about SQLAlchemy. FREE ACCESS
  • Locked
    7.  Installing the Advanced REST Client
    2m 37s
    In this video, you will install the Advanced REST Client, an API testing tool to test APIs and validate responses. First, you'll follow the demo to learn how to download and install the Advanced REST Client. Then, you'll learn more about the Advanced REST Client. FREE ACCESS
  • Locked
    8.  Serializing API Responses to JSON Format
    9m 3s
    In this video, you will learn to wire up your code. You'll learn to check for multiple errors at one time. The demo will show you how to serialize API responses to JSON format and use the marshal() function, marshal_with, and data_class decorators to serialize an object to JSON format. You will also learn how to perform queries and run Python code.  FREE ACCESS
  • Locked
    9.  Adding and Retrieving Data from a MySQL Database
    11m 1s
    In this video, you will learn how to wire up the methods to add and retrieve data from a MySQL database. In this demo, you will use the marshal technique in Flask-RESTful.  FREE ACCESS
  • Locked
    10.  Updating Data in a MySQL Database
    6m 38s
    In this video, you will wire up another API without a database backend. You'll update a book with an update book operation. Following the demo, you will learn to use the PUT method with JSON.  FREE ACCESS
  • Locked
    11.  Deleting Data in a MySQL Database
    3m 18s
    In this video, you will learn one last API. This is the delete operation. Following the demo, you will learn the delete method to remove a record from the database.  FREE ACCESS
  • Locked
    12.  Using the Envelope Parameter to Wrap JSON Responses
    10m
    In this video, you will see how to use output fields in Flask-RESTful to customize fields. It is important to customize fields for your customer. You will use the envelope parameters to structure the JSON response to the user. FREE ACCESS
  • Locked
    13.  Renaming and Formatting Response Fields in JSON
    5m 4s
    In this video, you will learn to change field names. The demo will show you how to configure JSON responses with special display names. You will use the Advanced Rest Client to return JSON responses.  FREE ACCESS
  • Locked
    14.  Working with JSON Response Default Values and URLs
    9m 15s
    In this video, you will learn to specify nested fields and URL paths within JSON responses. Next, you will learn how to make tweaks to your existing code. Finally, you will learn to customize fields to update your URL. FREE ACCESS
  • Locked
    15.  Creating Custom Fields in JSON Responses
    6m 53s
    In this video, you will learn to create customs in JSON responses. You'll discover that these custom fields have values derived from other fields. FREE ACCESS
  • Locked
    16.  Creating Custom Parsing and Mapping Errors
    9m 23s
    In this video, you will learn to create custom error messages for specific error handling using MySQL Database and Flask-RESTful. You'll learn to use the request parser to perform custom parsing as specified by the user. FREE ACCESS
  • Locked
    17.  Course Summary
    2m 20s
    This video summarizes what you've learned in the course. You've explored the creation of APIs to perform CRUD operations. You installed MySQL, the MySQL Workbench, Python SQLAlchemy, and created a Python table. You learned to create tables, use the REST client to test APIs, and learned to query. You also integrated the API server with the MySQL database. Finally, you discovered how to configure and format output fields and configure custom error codes.  FREE ACCESS

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE

Rating 1.0 of 1 users Rating 1.0 of 1 users (1)
Rating 4.7 of 57 users Rating 4.7 of 57 users (57)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.7 of 20 users Rating 4.7 of 20 users (20)
Rating 4.5 of 196 users Rating 4.5 of 196 users (196)
Rating 3.7 of 3 users Rating 3.7 of 3 users (3)