(2023-10) Update: see this post to return pydantic models Let's write a simple function which returns data in a sane and organized way from a SQLite3 database using only the Python 3 standard library. We will be working in Python 3.8 for this example and will be using some very basic SQL statements. If you are new to SQL, I highly recommend this course: https://www.executeprogram.com/courses/sql I wrote a gist as an example program to test and demonstrate this concept as well.