Linux: how to run speedtest from terminal

Sometime I need to check the internet speed via command line interface (cli) on some headless Linux server without X11. I could install some apposite tool but considering that I usually need to execute the speedtest on the fly and once only, then I prefer a simpler alternative, I use speedtest-cli.

Speedtest-cli is a an open source software that can be execute without installation, via wget or curl, we can simply use in the terminal one of the following commands:

wget -O - | python

curl -s | python -