SQLite and SQLAlchemy in Python: Moving Your Data Beyond Flat Files

All programs process data in one form or another, and many need to be able to save and retrieve that data from one invocation to the next. Python, SQLite, and SQLAlchemy give your programs database functionality, allowing you to store data in a single file without the need for a database server.

You can achieve similar results using flat files in any number of formats, including CSV, JSON, XML, and even custom formats. Flat files are often human-readable text files—though they can also be binary data—with a structure that can be parsed by a computer program. You’ll explore using SQL databases and flat files for data storage and manipulation and learn how to decide which approach is right for your program.

In this video course, you’ll learn how to use:

  • Flat files for data storage
  • SQL to improve access to persistent data
  • SQLite for data storage
  • SQLAlchemy to work with data as Python objects

What’s Included:

Downloadable Resources:

Related Learning Paths:

About Christopher Trudeau

Christopher has a passion for the Python language and writes for Real Python. He is a consultant who helps advise organizations on how to improve their technical teams.

» More about Christopher

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Avatar image for FooledByCode

FooledByCode on July 26, 2022

Your tutorials are as interesting as your talks on the Podcast, thanks for this course. My #1 take away is, that I shouldn’t had to be so hard on myself for not finding SQL interesting, ORM could have saved me.

← Browse All Courses