Python Execute Function In Sql