sqlite3 is Python’s standard-library interface to SQLite. It opens a connection to a database file, creating the file when it does not exist, and supports executing queries and iterating over results. section 6.3.1
A persistence layer can wrap sqlite3 in a DatabaseManager so storage details stay separate from higher-level application concerns. The connection supplies the foundation for table creation and CRUD operations. section 6.3.1
A small sqlite3-backed manager can provide:
- Table creation, filtering, sorting, and record counting for application data. section 6.3.1
Opening a database
import sqlite3 class DatabaseManager: def __init__(self, database_filename): self.connection = sqlite3.connect(database_filename)


