python sqlite stored procedures