Install Python to run speedtest-cli on android phone with no access to device - via adb
Solved this eventually. Here is what I did - 


Installed termux via downloading apk and performing adb install com.termux.apk
Remotely launched the termux app via adb  (monkey) (this is needed to complete install on the device) monkey -p com.termux -c android.intent.category.LAUNCHER
once termux is installed I installed python and speedtest-cli on the device using adb input text and keyevents - 


adb input text "pkg install python"
adb input keyevent "66"
adb input text "pip install speedtest-cli"

Then navigate to /data/data/com.termux/files/usr/bin
here you should have the speedtest-cli script that you can invoke from adb shell

/data/data/com.termux/files/usr/bin # ./speedtest-cli
Retrieving speedtest.net configuration...
Testing from XXXXX
Testing download speed................................................................................
Download: 20.18 Mbit/s
Testing upload speed......................................................................................................
Upload: 3.98 Mbit/s