I cannot find any example on the net of how the SQLite 3 vacuum command is done on a database.
import sqlite3 con = sqlite3.connect(<file_name>) .. con.execute("VACUUM") ..
Just open a connection and execute the VACUUM command;
conn=sqlite3.connect(SQLITE_FILE) conn.execute("VACUUM") conn.close()