Download a file using button html
Other download actions can be set from the Opening file dialog box that opens when you first encounter a particlar file type (see above). All of the file contents is received using the response.read() method call. After calling this, we have the file data in a Python variable of type string.