Using PyMySQL library: http://zetcode.com/python/pymysql/ MySQLdb, a Python connection guide: https://mysqlclient.readthedocs.io/ The DB-API 2.0 interface for SQLite databases: https://docs.python.org/3/library/sqlite3.html