1. File access options
A big advantage of girder is that files can be accessed either with a nice user interface (in a web browser) or more programmatically (via CLI or programming interfaces). This is true for both upload and download.
1.1. Web browser UI
If you are new to Girder, you should start with the web user interface to discover the service. You are encouraged to read the documentation documentation and especially the user guide. For example, using a web browser, you can reach our server.
This is quite straightforward and it should illustrate important concepts and help better visualize the following section. |
1.2. Python API
To download or upload a file using python, we have two options. We can either use a login system (user + password) or an API key. - With the user/password, we will need to provide a user and a password to access files, just like a human would do using the UI. - With an API key, the script only needs an API key. This means we do not need to have an account on the Girder server.
In both cases, similar pieces of information are required:
-
an address (URL): to reach the server,
-
a file ID: to tell which file/directory we want to manipulate,
-
either a user/password pair or an API key: to grant access to the required file(s).
1.3. Feel++ remotedata tool
The application feelpp_remotedata
can also be used to upload/download data from Girder, both files and entire folders.
Some examples of its usage follow, and additional information can be found here.
feelpp_remotedata --download "girder:{file:5b1f8707b0e9570499f66bd0}" --data $HOME/mydir
feelpp_remotedata --download "girder:{folder:<folder-id>}"
feelpp_remotedata --upload "girder:{folder:<a folder id>}" --data $HOME/mydata
A Python interface to these functionalities is also available.
import feelpp as fpp
app = fpp.Environment(["myapp"],config=fpp.localRepository(""))
sm_csv_names = fpp.download( "girder:{file:[<file1-id>,<file2-id>]}", worldComm=app.worldCommPtr())
# It is possible to download an entire folder in zip format
# sm_csv_zipped_folder = fpp.download( "girder:{folder:<folder-id>}", worldComm=app.worldCommPtr())