An AP implementation using flask