JavaScript Minifier Python Example

Check the example on how to use
Python
to minify a JavaScript hardcoded string and output to stdout:
import requests

response = requests.post('https://www.toptal.com/developers/javascript-minifier/api/raw', data=dict(input='console.log(  1  )')).text

print("{}".format(response))
Install
requests
module, save the code to a file named
minify.py
and run the following command:
python3 minify.py

Output:

console.log(1)