class datalad_osf.annex_remote.OSFSpecialRemote(*args)[source]

git-annex special remote for the open science framework

Any OSF node can be used as a remote, but the recommended setup is to create a subcomponent of your project for archiving your data. Mark it with the Data category so you can find it quickly and take note of its URL. Each component (or project) has a URL like which is needed to connect to it.


Write doc section on how to do that, and what URL should be used to configure the special remote.

Initialize the special remote:

git annex initremote osf type=external externaltype=osf \
     encryption=none node=<your-component-id>/

To upload files you need to supply credentials.


Outline how this can be done

OSF_USERNAME, OSF_PASSWORD - credentials, OR OSF_TOKEN # TODO: untested, possibly currently broken in osfclient.

Because this is a special remote, the uploaded data do not retain the git folder structure.

The following parameters can be given to git-annex initremote, or git annex enableremote to (re-)configure a special remote.

the OSF URL of the file store
a subpath with (default: /)

See also
Documentation on git-annex special remotes
Open Science Framework, a science-focused filesharing and archiving site.

Initialize self. See help(type(self)) for accurate signature.


__init__(*args) Initialize self.
checkpresent(key) Report whether the OSF node has a particular key
checkpresentexport(key, remote_file) Return if the file remote_file is present in the remote
checkurl(url) Asks the remote to check if the url’s content can currently be downloaded (without downloading it).
claimurl(url) Asks the remote if it wishes to claim responsibility for downloading an url.
error(error_msg) Generic error.
getavailability() Asks the remote if it is locally or globally available.
getcost() Requests the remote to return a use cost.
remove(key) Remove a key from the remote
removeexport(key, remote_file) Remove the file in remote_file from the remote
removeexportdirectory(remote_directory) Remove the directory remote_directory from the remote
renameexport(key, filename, new_filename) Move the remote file in name to new_name
transfer_retrieve(key, filename) Get a key from OSF and store it to filename
transfer_store(key, filename)
transferexport_retrieve(key, local_file, …) Get the file located at remote_file from the remote
transferexport_store(key, local_file, …) Store the file located at local_file to remote_file on the remote
whereis(key) Asks the remote to provide additional information about ways to access the content of a key stored in it, such as eg, public urls.