Step 2: load your credentials from within your algorithm

Once the credentials have been stored in a safe place (for example a file called “credentials.json” inside a Private folder called “BackblazeCredentials”), I’ll need to load them from within my algorithm:

Step 3: import dependencies and write code to manipulate your files

b2blaze is a module which allows for the uploading and downloading of files to/from a Backblaze bucket, so we’ll add b2blaze to our Dependencies within our algorithm, then add a bit of code to upload a file:

This example grabs the file “somecollection/somefile.png” from our Hosted Data, and uploads it to the bucket “some_bucket_name” as “remotefolder/remotefile.png”. We could use other functions of the b2blaze library to perform other operations instead, such as downloading a file from Backblaze and examining its contents, or creating and deleting folders or even entire buckets.

Your algorithm can contain abstract code, so feel free to experiment and use whichever public libraries fit your needs for connecting to the storage provider of your choice – but do check our list of Data Connectors first to see if we already have a built-in connector ready for you to use.