To try this on your own, you can use the code snippet below that is used in this demonstration.
auth = HydroShareAuthBasic(username= username, password= password)
hs = HydroShare(auth=auth)
fpath='/tmp/%s.zip' % title
hs.getResource(title, destination='/tmp')
wrapper = FileWrapper(open(os.path.abspath(fpath), 'rb'))
response = HttpResponse(wrapper, content_type='text/plain')
response['Content-Disposition'] = 'attachment; filename=%s' % os.path.basename(fpath)
response['Content-Length'] = os.path.getsize(fpath)
return response