I am creating auto tests for application (with python, that i am not so familiar with).

Simplified logic:

  1. Start application
  2. Start my service
  3. Send request for that application to perform task
  4. Application send to my service http request with some info

I totally have no idea what to use. After small research i found tornado, but it looks like overkill lib for my task.

Can someone recommend that kind of lib for python (with official documentation)

1 Answer 1


Python has a web server built-in. Maybe this is all what you need.

On the Command Line,

  • Change to the directory where your interesting files are.
  • run:

python -m SimpleHTTPServer 8808 > /tmp/simple-web-server.log 2>&1 &

  • Send your requests to http://localhost:8808 or

(whatever your IP is. Maybe you prefer to use the hostname. YMMV.)

You can use any other port number rather than 8808, but avoid numbers < 1024 because they are "privileged ports".

If you have only python3, run

python3 -m http.server 8808 --bind > /tmp/simple-web-server.log 2>&1 &

and open your browser here: http://localhost:8808

  • i tryed, but call "serve_forever" block script execution
    – myTalala
    Sep 4, 2019 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.