DEV Community

vcavanna
vcavanna

Posted on

Making a Python SQL Database with a Flask Web API

This is meant to document my project to get familiar with Python, SQL Databases, and Flask by creating a Flask API. My goal is to follow and implement tutorials, gradually working up to the first project.

The first tutorial that I'm following for this project is realpython's flask and connexion tutorial

I'm going to update this post with any takeaways, difficulties, etc., as well as post the end results.

Challenges:

  • Dependency conflicts!! I found in the tutorial that despite following the steps, the connexion dependency didn't work with the flask-sql package installed. I resolved this by updating the connexion dependency, which fixed the issue.

Key Takeaways:

  • swagger is an extension of flask that lets you document your flask API according to openAI standards.
  • One thing I wish the tutorial had was a way to easily test the API as I was developing it. So I added Postman following this tutorial, which was very helpful. Image description
  • Definitely it would be nice to research the SQLAlchemy app! I'm new to SQL database management, so this seems like a good way to start.

Top comments (0)