azure-storage-blobs

Azure Blob - Read using Python

﹥>﹥吖頭↗ 提交于 2019-11-30 09:12:59
Can someone tell me if it is possible to read a csv file directly from Azure blob storage as a stream and process it using Python? I know it can be done using C#.Net (shown below) but wanted to know the equivalent library in Python to do this. CloudBlobClient client = storageAccount.CreateCloudBlobClient(); CloudBlobContainer container = client.GetContainerReference("outfiles"); CloudBlob blob = container.GetBlobReference("Test.csv");* Yes, it is certainly possible to do so. Check out Azure Storage SDK for Python from azure.storage.blob import BlockBlobService block_blob_service =

Azure Storage: 403 Server failed to authenticate the request

北慕城南 提交于 2019-11-30 08:26:45
问题 I've search here and in Google but I can't find a solution. With my C# code I want to read a file from Azure Storage Blob. The code (only 6 line) works very well in another project (Windows 8.1 Universal App) but not in my new Windows 10 UWP App. This is my code: CloudStorageAccount storageAccount = CloudStorageAccount.Parse(azureConnectionString); CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); CloudBlobContainer container = blobClient.GetContainerReference("container

Copying storage data from one Azure account to another

本秂侑毒 提交于 2019-11-30 08:21:57
I would like to copy a very large storage container from one Azure storage account into another (which also happens to be in another subscription). I would like an opinion on the following options: Write a tool that would connect to both storage accounts and copy blobs one at a time using CloudBlob's DownloadToStream() and UploadFromStream(). This seems to be the worst option because it will incur costs when transferring the data and also be quite slow because data will have to come down to the machine running the tool and then get re-uploaded back to Azure. Write a worker role to do the same

How to clean an Azure storage Blob container?

北慕城南 提交于 2019-11-30 07:58:15
I just want to clean (dump, zap, del . ) an Azure Blob container. How can I do that? Note: The container is used by IIS (running Webrole) logs (wad-iis-logfiles). A one liner using the Azure CLI 2.0: az storage blob delete-batch --account-name <storage_account_name> --source <container_name> Substitute <storage_account_name> and <container_name> by the appropriate values in your case. You can see the help of the command by running: az storage blob delete-batch -h There is only one way to bulk delete blobs and that is by deleting the entire container. As you've said there is a delay between

FTP to Azure Blob Storage

白昼怎懂夜的黑 提交于 2019-11-30 06:44:56
I had to setup secure FTP to Azure Blob Storage using popular FTP clients (like FileZilla, for example). After doing lot of research, I came across a link that says: Deployed in a worker role, the code creates an FTP server that can accept connections from all popular FTP clients (like FileZilla, for example) for command and control of your blob storage account. Following the instructions of the link, I had implemented the same and deployed the worker role on Azure production environment and it was successful. But still I am not able to connect the FTP host server (provided by me in

Does Windows Azure Blob Storage support serving compressed files similar to Amazon S3?

吃可爱长大的小学妹 提交于 2019-11-30 05:14:47
问题 For example, at Amazon S3, there is a convention, if you have both 'bundle.js' and 'bundle.js.gz' uploaded to the server, and a client requests for 'bundle.js' file with 'Accept-Encoding: gzip' header, Amazon S3 will serve the compressed version of this file ('bundle.js.gz' instead of 'bundle.js'). Does Windows Azure Storage support this? If not, what are workarounds? 回答1: Azure Storage allows you to define Content-Encoding property on a blob. For compressed content, you could set this

Serving Video Content from Azure Blob Storage

我与影子孤独终老i 提交于 2019-11-30 05:14:22
I am trying to serve MP4 Video content from Azure Blob Storage. I can get the video to play in modern browsers by ensuring that the Blob's Content Type is set to video/mp4 ; however I am unable to seek backwards. Dropping the same video into an S3 bucket yields the desired result so I am ruling out problems with the content. Do I need to configure the Storage role in a specific way to serve video content? it was not clear for me from @smarx's answer how to set that for my blob container - but after some googling i found the code below. Just execute it in LINQPad, and video will start streaming

How to upload huge files to the Azure blob from a web page

巧了我就是萌 提交于 2019-11-30 05:05:45
Internally ASP.NET has a 2 GB addressing space, but in reality you only have less than 1 GB free for uploads (see http://support.microsoft.com/?id=295626 ). In addition IIS 7 has a cap of 30 MB ( see http://www.iislogs.com/steveschofield/iis7-post-40-adjusting-file-upload-size-in-iis7 ) and you supposedly have to run appcmd set config "My Site/MyApp" -section:requestFiltering -requestLimits.maxAllowedContentLength:104857600 -commitpath:apphost on the server to go beyond this 30 MB limit. But how can I run this on my Azure servers? Also, according to http://support.microsoft.com/?id=295626

How best to convert from azure blob csv format to pandas dataframe while running notebook in azure ml

為{幸葍}努か 提交于 2019-11-30 04:53:41
问题 I have a number of large csv (tab delimited) data stored as azure blobs, and I want to create a pandas dataframe from these. I can do this locally as follows: from azure.storage.blob import BlobService import pandas as pd import os.path STORAGEACCOUNTNAME= 'account_name' STORAGEACCOUNTKEY= "key" LOCALFILENAME= 'path/to.csv' CONTAINERNAME= 'container_name' BLOBNAME= 'bloby_data/000000_0' blob_service = BlobService(account_name=STORAGEACCOUNTNAME, account_key=STORAGEACCOUNTKEY) # Only get a

The MAC signature found in the HTTP request '…' is not the same as any computed signature

∥☆過路亽.° 提交于 2019-11-30 01:43:33
问题 I'm sending the following request in Postman to retrieve a simple .jpg from Azure Blob storage at this URL https://steamo.blob.core.windows.net/testcontainer/dog.jpg GET /testcontainer/dog.jpg HTTP/1.1 Host: steamo.blob.core.windows.net Authorization: SharedKey steamo:<my access key> x-ms-date: Tue, 26 May 2015 17:35:00 GMT x-ms-version: 2014-02-14 Cache-Control: no-cache Postman-Token: b1134f8a-1a03-152c-2810-9cb351efb9ce If you're unfamiliar with Postman it is just a REST client - the