Recipe Difficulty: Easy
Python Version: 3.5
Operating System: Any
As discussed, SQLite databases serve as the primary data repository on mobile devices. Python has a built-in library, sqlite3, which can be used to interface with these databases. In this script, we will interact with the iPhone sms.db file and extract data from the message table. We will also use this script as an opportunity to introduce the csv library and write the message data to a spreadsheet.
To learn more about the sqlite3 library, visit https://docs.python.org/3/library/sqlite3.html.