Support for v2.1 of Azure python sdk
See original GitHub issueThis problem refers to #444
I am working with smart_open
for Azure blob storage, but I’m working on a codebase that uses the older API interface by azure i.e. v2.1 which provides BlockBlobService
. I see in the client this accepts BlobServiceClient. Could it be used with BlockBlobService?
Talking about this version here.
In the current code if I try to use v2.1 client like
from azure.storage.blob import BlockBlobService
from smart_open import open as sopen
client = BlockBlobService(account_name='account-name', account_key='secret-key')
sopen('azure://{0}/{1}'.format("container", "file"), 'wb', transport_params=dict(client=client))
I get an error:
AttributeError: 'BlockBlobService' object has no attribute 'get_container_client'
which hints over API differences in v2.1 and v12.0
Would we implement smart_open for azure v2.1 python-sdk too? If yes, would like to contribute.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
which SDK is better to use for azure: blobs with Python v2.1 ...
Though not recommended but the only reason one would want to use version 2.1 of the SDK if there's a need to have...
Read more >Azure Machine Learning CLI & Python SDK (v2)
SDK v2 allows you to build a single command or a chain of commands like Python functions - the command has a name,...
Read more >Use the Azure libraries (SDK) for Python | Microsoft Learn
The Azure libraries are how you communicate with Azure services from Python code that you run either locally or in the cloud. (Whether...
Read more >Azure ML Package client library for Python | Microsoft Learn
Python SDK v2 allows you to move from simple to complex tasks easily and incrementally. This is enabled by using a common object...
Read more >Tutorial: ML pipelines with Python SDK v2 - Azure
The Azure ML framework can be used from CLI, Python SDK, or studio interface. In this example, you'll use the AzureML Python SDK...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I agree with the comments above. I do not think we should add backwards compatibility for a depreciated SDK. Seems like if @prakharcode needs this he should fork and build it himself with the expectation that this will not be merged upstream.
the 2.1 and 12.0 versions don’t play well with each other at all. I recently moved some of my other code to 12.0 I would suggest getting there as soon as possible.