From the course: Deploying Scalable Machine Learning for Data Science

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Using Flask to create APIs for Python programs

Using Flask to create APIs for Python programs

- [Instructor] For this video I am assuming you are familiar with Python programming and Python development tools. Python is widely used for machine learning. If you work with Python and want to be able to quickly deploy your Python models as services, you can use the Flask package. Flask is a Python library and can be installed in your Python environment using Python tools like pip. Once it's installed and loaded into a Python program you can add simple commands to your code to create an API interface. Flask, like plumber, uses the idea of decorators. This is specialized code that is added to your script. Flask uses the specialized codes as directions for constructing API function calls. The decorators are inserted as code above functions that should have an API generated for them. The code is prefixed with an at sign. For example, let's create a classify function that calls a classifier. Let's assume we've created a few different classifiers, but we wanna use the same interface to…

Contents