02. Azure using Python SDK: Access and upload files in Azure Blob Storage

Поделиться
HTML-код
  • Опубликовано: 5 янв 2025

Комментарии • 25

  • @pavankalyanaddepalli22
    @pavankalyanaddepalli22 9 месяцев назад +2

    Awesome Explanation
    I searched for many resources, but couldn't find a good one like this

  • @InaamIlahi-n8n
    @InaamIlahi-n8n 2 месяца назад +1

    i have one word for this guy: "kamaaal"

  • @ramum4684
    @ramum4684 9 месяцев назад

    Awesome explanation Thank you.
    Looking for good vedios further

  • @MotivationPeace2025
    @MotivationPeace2025 Год назад +2

    It’s really detailed video.
    Thanks for sharing knowledge!!

  • @therealsirben
    @therealsirben Год назад +1

    Thank you so much for this detailed tutorial

  • @dhanaraj5638
    @dhanaraj5638 4 месяца назад +1

    Thanks for your video. It's really useful

  • @oscarlai9511
    @oscarlai9511 4 месяца назад

    Perfect resource, love your work

  • @gauravgkpabes
    @gauravgkpabes 3 месяца назад +1

    GREAT

  • @lavanijavidalikhan3844
    @lavanijavidalikhan3844 10 месяцев назад

    When i am executing with excel file it is getting encrypted in o/p
    How to tackle that

  • @olatunjiosunji8579
    @olatunjiosunji8579 8 месяцев назад +1

    So, if i need to locally write a python script to connect to Azure storage from a linux box, I cannot use DefaultAzureCredential for authentication

    • @TechyTacos
      @TechyTacos  8 месяцев назад

      Actually, you can use DefaultAzureCredential for authentication when writing a Python script. ClientSecretCredential and DefaultAzureCredential are both part of the azure-identity library and are used for authentication in Azure.
      ClientSecretCredential is a more direct method that requires specific details (client ID, client secret, and tenant ID), while DefaultAzureCredential is a more flexible method that can handle a variety of scenarios.
      DefaultAzureCredential is a class that provides a simplified authentication experience. It’s designed to interactively authenticate your development environment, a managed identity, or a service principal. It sequentially checks for the availability of multiple credential types and uses the first one it finds. This makes it a more flexible option when you’re unsure of the environment in which your code will be run.
      I will try to cover it in my future videos !

  • @kartheekt-d4x
    @kartheekt-d4x Год назад

    Thanks for knowledge sharing, can we copy blobs from one storage account to other between different Tenants.

    • @TechyTacos
      @TechyTacos  11 месяцев назад +1

      Yes, it is possible to copy blobs from one storage account to another between different tenants.
      We can try something like this :
      from azure.storage.blob import BlobServiceClient
      # Create BlobServiceClient for source and target storage accounts
      source_blob_service_client = BlobServiceClient(account_url=".blob.core.windows.net", credential="")
      target_blob_service_client = BlobServiceClient(account_url=".blob.core.windows.net", credential="")
      # Get the container client for the source and target containers
      source_container_client = source_blob_service_client.get_container_client("")
      target_container_client = target_blob_service_client.get_container_client("")
      # List all blobs in the source container
      blobs_list = source_container_client.list_blobs()
      # Copy each blob from the source container to the target container
      for blob in blobs_list:
      source_blob_url = source_blob_service_client.make_blob_url("", blob.name)
      copied_blob = target_container_client.get_blob_client(blob.name)
      copied_blob.start_copy_from_url(source_blob_url)

  • @harshitgupta7782
    @harshitgupta7782 Год назад

    What if I have ADLS Gen2 and not Blob storage.
    Can you please also make a video on how to read data from ADLS Gen2 (HNS enabled)

    • @TechyTacos
      @TechyTacos  Год назад

      Thanks for the ask. Let me look into it.

  • @jintuthomas-vj3tt
    @jintuthomas-vj3tt 10 месяцев назад

    can you please share the link of service principle part ?

    • @TechyTacos
      @TechyTacos  10 месяцев назад

      Please refer this.
      ruclips.net/video/Vs3wyFk9upo/видео.html
      Search for Microsoft Entra ID instead of Azure Active Directroy. This service has been renamed.

  • @sudhansumtripathy
    @sudhansumtripathy Год назад

    bro how do I download the size of the file ,here the file size is 22bytes, how to write the script which says the file name and the file byte size

    • @TechyTacos
      @TechyTacos  Год назад +2

      You can do it very easily. We just need to loop over the list of the blobs and print the properties.
      for blob in container_client.list_blobs():
      print(f"Blob name: {blob.name}")
      print(f"Blob size: {blob.size} bytes")

  • @ansarikasim5497
    @ansarikasim5497 Год назад

    How to save this file?

    • @TechyTacos
      @TechyTacos  Год назад

      Are you looking to save file on your local ? Could you please explain a bit.

  • @sudhansumtripathy
    @sudhansumtripathy Год назад +1

    bro awesome , needs some help how to connect with you

    • @TechyTacos
      @TechyTacos  Год назад

      Thanks ! You can email. Please go to About -> Business Inquiries -> View Email to get email ID.