Creating the Core App with Flask

Learn how to create and start an application in Flask.

Now we'll create another microservice, the Core app, which will communicate with the Config and Houses apps. The Core app is in another Docker container and will internally make API calls to the other apps. It will also have its own MySQL database. We'll create it with the Python Flask framework.

Creating the core.py file

To create the Core app, we'll first create a project directory/folder called backendservice2. Inside this folder, we'll create a file named core.py, open it, and then import the Flask object from flask, as shown below:

Get hands-on with 1400+ tech skills courses.