Defining every Query in one file. Flask & SQLAlchemy.

Hey there! Welcome to my blog where I post about my journey as a self-taught developer. You can find my GitHub by clicking HERE.

As an application grows, sometimes it is difficult to determine where you should be putting your code. In this post I will share some ideas I have used lately to store my SQL queries in one location within my codebase. We will be importing functions, and using parameters to represent models.

Let’s check out an example file tree. Take a look below!