datopian / ckanext-cloudstorage

Implements support for resource storage against multiple popular providers via apache-libcloud (S3, Azure Storage, etc...)
MIT License
0 stars 2 forks source link

ckanext.cloudstorage.connection_link not documented in README #5

Open JVickery-TBS opened 2 years ago

JVickery-TBS commented 2 years ago

ckanext.cloudstorage.connection_link usage in https://github.com/datopian/ckanext-cloudstorage/blob/master/ckanext/cloudstorage/storage.py#L162 was merged but the config option was not documented in the README.

Not sure what I am supposed to set this to?

The property is used in azure.storage.blob.BlobServiceClient.from_connection_string() calls. Would be good to link https://learn.microsoft.com/en-us/python/api/azure-storage-blob/azure.storage.blob.blobserviceclient?view=azure-python#azure-storage-blob-blobserviceclient-from-connection-string

as well as specify all of the options from the azure-storage-blob library:

JVickery-TBS commented 2 years ago

Perhaps a fair option would be to modify connection_link property definition to just use the already loaded driver_options:

@property
    def connection_link(self):
        """
        The connection link to the container
        """
        return "AccountName={};AccountKey={}".format(
            self.driver_options['key'],
            self.driver_options['secret']
        )