REST APIs are everywhere around us and are used to build good-quality software. In data science, they are used to deploy machine learning models to production, so no, you can’t avoid them in the long run. Today we’ll create a simple but fully functional database-driven API with Python and Flask-RESTful.

Here’s a quick rundown of the technologies used:

  • Python – a fantastic programming language used widely for all types of tasks
  • Flask-RESTful – an extension of the Flask library. Enables us to develop APIs quickly
  • SQLAlchemy – an ORM (Object Relational Mapper). Helps us to communicate with the database without writing SQL

And that’s pretty much it. This article should be easy to follow, and it shouldn’t take you more than 10-15 minutes to complete (if following along with the code).

The article is structured as follows:

  • Problem description
  • Setup and model declaration
  • API development
  • Testing
  • Conclusion

You can download the source code here. Let’s get started.

#python #rest api #database

Develop Database Driven REST API with Python in 10 Minutes
39.10 GEEK