Table Of Contents
Table Of Contents

Download data from Azure

Links: notebook, html, PDF, python, slides, slides(2), GitHub

Material for the hackathon ENSAE / Red Cross / 2015. Connect to an Azure blob storage.

%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use('ggplot')
from jyquickhelper import add_notebook_menu
add_notebook_menu()

Connection to the cluster

import keyring
hackathon = {}
hackathon["blob_storage"] = keyring.get_password("CRCREDENTIALS", "blobstorage")
hackathon["password"] = keyring.get_password("CRCREDENTIALS", "password")
blobstorage = hackathon["blob_storage"]
blobpassword = hackathon["password"]
%load_ext pyensae
cl, bs = %blob_open
cl, bs
(<pyensae.remote.azure_connection.AzureClient at 0x9111898>,
 <azure.storage.blob.blobservice.BlobService at 0x91118d0>)

Download data

%blob_ls croix-rouge
name last_modified content_type content_length blob_type
0 build/SINVOICE_M.csv Wed, 18 Nov 2015 18:56:27 GMT application/octet-stream 533771533 BlockBlob
1 build/Test_CRFFOR.GACCTMPD.csv Sun, 22 Nov 2015 21:53:38 GMT application/octet-stream 822231942 BlockBlob
2 data/ITMMASTER.schema.txt Mon, 16 Nov 2015 23:00:34 GMT application/octet-stream 5658 BlockBlob
3 data/ITMMASTER.txt Mon, 09 Nov 2015 21:41:00 GMT application/octet-stream 103096479 BlockBlob
4 data/SINVOICE.schema.txt Mon, 16 Nov 2015 23:00:35 GMT application/octet-stream 10252 BlockBlob
5 data/SINVOICE.txt Mon, 09 Nov 2015 21:42:32 GMT application/octet-stream 1362433753 BlockBlob
6 data/SINVOICEV.schema.txt Mon, 16 Nov 2015 23:00:35 GMT application/octet-stream 7999 BlockBlob
7 data/SINVOICEV.txt Mon, 09 Nov 2015 21:44:08 GMT application/octet-stream 1252461865 BlockBlob
8 data/enseignes_france.csv Mon, 09 Nov 2015 21:40:54 GMT application/octet-stream 6303836 BlockBlob
9 data/stojou.csv Mon, 09 Nov 2015 21:55:23 GMT application/octet-stream 8821375868 BlockBlob
10 readme.txt Sun, 22 Nov 2015 18:00:34 GMT application/octet-stream 45 BlockBlob
%blob_down croix-rouge/data/ITMMASTER.schema.txt ITMMASTER.schema.txt -o
'ITMMASTER.schema.txt'

Close connection

%blob_close
True