Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
blockblobservice
#2
(Sep-25-2020, 09:03 AM)dakke Wrote: Is this error caused by a bug in latest version of "azure-storege-blob" or has 'BlockBlobService' been removed by intention?
No the have just changed the packing structure,so now do you call it as shown in there documentation.
Quick test.
>>> from azure.storage.blob import BlobServiceClient

>>> BlobServiceClient.api_version
<property object at 0x077960F0>

>>> help(BlobServiceClient.api_version)
Help on property:

    The version of the Storage API used for requests.

    :type: str

>>> import azure.storage.blob.blockblobservice
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'azure.storage.blob.blockblobservice'
There is still a way to do the older call but the have put _ which mean that should not mess with it.
>>> import azure.storage.blob._blob_service_client

# Do this trix
>>> blob = azure.storage.blob._blob_service_client.BlobServiceClient

>>> blob.api_version
<property object at 0x0916D420>


>>> help(blob.api_version)
Help on property:

    The version of the Storage API used for requests.

    :type: str
But come to same place,so now use first one as they updated in package and documentation.
Reply


Messages In This Thread
blockblobservice - by dakke - Sep-25-2020, 09:03 AM
RE: blockblobservice - by snippsat - Sep-25-2020, 11:25 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020