Download a Resource

Downloading a Resource from HydroShare is made possible and very easy with this feature. We make use of two seperate APIs from hs_restclient to accomplish this task. The browse for a Resource API using the subject parameter and the API to download a Resource.

Step 1: Sign into HydroShare using your credentials

In the boxes below you enter your HydroShare username and its password. If you need to make a HydroShare account, click here.

This feature downloads the contents of a resource. The resource is zipped and downloaded, using an API from the HydroShare python library. The files can be extracted for use once they are downloaded. Also this feature is exclusive to the resources you own in HydroShare.

Step 2: Type in your subject of the resource you are looking for

Step 3: Browse for the resource you are looking for

The resources related to the subject, mentioned above, will appear in the scroll below. Depending on the number of the resources with respect to the subject in HydroShare, it could take a couple seconds to a few minutes.

The resource ID is what you could use in other features of the app like adding a file or downloading a file or even deleting a file from a resource.

Resource id of the selected Resource:

Learn more:

To try this on your own, you can use the code snippet below that is used in this demonstration.

    
from hs_restclient import HydroShare, HydroShareAuthBasic
auth = HydroShareAuthBasic(username='myusername', password='mypassword')
hs = HydroShare(auth=auth)
options = {
                "zip_with_rel_path": "/source/path/file.zip",
                "remove_original_zip": True,
                "overwrite": False
                        }
result = hs.resource('ID OF RESOURCE GOES HERE').functions.unzip(options)