http server python api code example Example 1: simple http server python python -m SimpleHTTPServer 8080 Example 2: http.server python python3 -m http.server