The Python SDK allows you to retrieve a list of shared files, share a file, and stop sharing a file. The following examples provide detailed steps that describe how to use supported methods and include code samples to help you get started with shares.
The following code sample shows you how to share a file.
# cloud_file object returned from fullview or metadata calls share_request = ShareRequest(cloud_file.uri, 'new share name', size=cloud_file.size, type='file') share = cloud.share(share_request)
The following code sample shows you how to retrieve a list of shared files.
shares, shares_cursor = cloud.shares() # getting the next page of results shares, shares_cursor = cloud.shares(cursor=shares_cursor.next)
The following code sample shows you how to stop sharing a file.
# share returned from shares or share api call cloud.unshare(share.uid)
Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.