http://www.oschina.net/translate/python-windows-azure

Len  6:17:54 PM

__author__ = 'len.li'

from azure.storage import BlobService

AccountName='acdpdeploytest'

AccountKey='BLGXQ/P/6J1fI3xfIWxyShEms/N9TU85sD8gF+l1fju6QUgPaevXEKTOXQ=='

LocalPath = 'd:/log/data/';

AzureStorageDirname='picture'

AzureScrpitdir = 'scripts'

files = ['Test.bat']

def downloadAzureFile(dirname,filename,localfilename):

print('Start Download Azure File '+dirname+'/'+filename)

try:

blob_service = BlobService(AccountName,AccountKey)

blob=blob_service.get_blob_to_path(dirname,filename,LocalPath+localfilename)

if  blob is None:

print('End Download Azure File:'+filename+' Download Success!')

except Exception,e:

print('End Download Azure File:'+filename+' Download Failed!--------------------------->'+e.message)

#-----------------------------------------------------

print('----------------------Start Execute downloadAzureFile----------------------->')

for filename in files:

downloadAzureFile(AzureScrpitdir,filename,filename)

print('----------------------End Execute downloadAzureFile------------------------->')

Len  6:27:08 PM

__author__ = 'len.li'

from azure.storage import BlobService

AccountName='acdpdeploytest'

AccountKey='BLGXQ/P/6J1fI3xfIcDWxyShEms/N9TUSG858gF+l1fju6QUgPaevXKaq'

LocalPath = 'data';

AzureStorageDirname='picture'

AzureScrpitdir = 'scripts'

files = ['${script_1}']

def downloadAzureFile(dirname,filename,localfilename):

print('Start Download Azure File '+dirname+'/'+filename)

try:

blob_service = BlobService(AccountName,AccountKey)

blob=blob_service.get_blob_to_path(dirname,filename,LocalPath+localfilename)

if  blob is None:

print('End Download Azure File:'+filename+' Download Success!')

except Exception,e:

print('End Download Azure File:'+filename+' Download Failed!--------------------------->'+e.message)

#-----------------------------------------------------

print('----------------------Start Execute downloadAzureFile----------------------->')

for filename in files:

downloadAzureFile(AzureScrpitdir,filename,filename)

print('----------------------End Execute downloadAzureFile------------------------->')

Len  6:29:18 PM

https://github.com/Azure/azure-sdk-for-python

Azure sdk for python的更多相关文章

  1. Azure SDK for Python Url

    Azure SDK for Python URL 明细表 AZURE_PUBLIC_CLOUD = Cloud( 'AzureCloud', endpoints=CloudEndpoints( man ...

  2. 【Azure Developer - 密钥保管库 】使用 Python Azure SDK 实现从 Azure Key Vault Certificate 中下载证书(PEM文件)

    问题描述 在Azure Key Vault中,我们可以从Azure门户中下载证书PEM文件到本地. 可以通过OpenSSL把PFX文件转换到PEM文件.然后用TXT方式查看内容,操作步骤如下图: Op ...

  3. 解决Java调用Azure SDK证书错误javax.net.ssl.SSLHandshakeException

    Azure作为微软的公有云平台,提供了非常丰富的SDK和API让开发人员可以非常方便的调用的各项服务,目前除了自家的.NET, Java, Python, nodeJS, Ruby,PHP等语言都提供 ...

  4. 解决 Java 调用 Azure SDK 证书错误 javax.net.ssl.SSLHandshakeException

    Azure 作为微软的公有云平台,提供了非常丰富的 SDK 和 API 让开发人员可以非常方便的调用的各项服务,目前除了自家的 .NET.Java.Python. nodeJS.Ruby,PHP 等语 ...

  5. Azure开发者任务之四:在Azure SDK 1.3中挂载调试器的错误

    我安装了Windows Azure SDK的1.3版本.我试着创建了一个Azure的“Hello World”应用程序. 我按了“F5”,然后我得到了下面这个错误: 我尝试了“Ctrl+F5”:不使用 ...

  6. 无责任Windows Azure SDK .NET开发入门篇一[Windows Azure开发前准备工作]

    一.Windows Azure开发前准备工作 首先我们需要了解什么是 Azure SDK for .NET?微软官方告诉我们:Azure SDK for .NET 是一套应用程序,其中包括 Visua ...

  7. 宣布发布 Windows Azure SDK 2.2,正式发布 Windows Azure Backup 和 Hyper-V 恢复管理器预览版

    开发人员正逐渐转向云计算,因为它具有众多优势,包括成本.自动化和让开发人员专注于应用程序逻辑的能力.我们很高兴地宣布,继推出 Visual Studio 2013 之后,今天将发布 Windows A ...

  8. 无责任Windows Azure SDK .NET开发入门(二):使用Azure AD 进行身份验证

    <編者按>本篇为系列文章,带领读者轻松进入Windows Azure SDK .NET开发平台.本文为第二篇,将教导读者使用Azure AD进行身分验证.也推荐读者阅读无责任Windows ...

  9. 无责任Windows Azure SDK .NET开发入门篇(一):开发前准备工作

    Windows Azure开发前准备工作 什么是 Azure SDK for .NET?微软官方告诉我们:Azure SDK for .NET 是一套应用程序,其中包括 Visual Studio 工 ...

随机推荐

  1. twitter通过oAuth验证获取json数据

    protected void Page_Load(object sender, EventArgs e) { var oAuthConsumerKey = "你的key"; var ...

  2. 当target属性在XHTML script中无效时

    <a href="#" target=_blank></a>target此属性能够使链接在新窗口打开,但是在XHTML script中无效时. 那么解决方案 ...

  3. [LintCode] Integer to Roman 整数转化成罗马数字

    Given an integer, convert it to a roman numeral. The number is guaranteed to be within the range fro ...

  4. LeetCode 刷题顺序表

    Id Question Difficulty Frequency Data Structures Algorithms 1 Two Sum 2 5 array + set sort + two poi ...

  5. linux安装memcached及memcache扩展

    一.安装libevent函数库 下载地址:http://libevent.org 默认被安装到:/usr/local/lib目录下 安装memcached之前需要先安装libevent函数库. 可以通 ...

  6. Daily Scrum 10.26

    虽然是星期六,大家也没有丝毫懈怠,但由于其他各科也已经布置了相应的大作业,我们组投入在软工作业上的时间也是有一定限度的.由于这次任务较重,今日的完成量只有一部分,剩余的留为明天继续. 下表是今日完成工 ...

  7. 导出excel时,以form方式提交json数据

    今天在写项目时写到一个excel的导出,开始想用ajax请求后台后导出,但发现ajax会有返回值,而且ajax无法直接输出文件,而后台的excel导出方法已经封装好,不方便修改. 就改用了提交的方式f ...

  8. CCF认证(1)

    #include <iostream> #include <windows.h> using namespace std; typedef struct letter{ int ...

  9. ss命令

    看到好的博文,所以记录一下.本文出自转载. ss是Socket Statistics的缩写.顾名思义,ss命令可以用来获取socket统计信息,它可以显示和netstat类似的内容.但ss的优势在于它 ...

  10. php 中如何创建一个空对象

    // 创建一个空对象 $obj=(object)array(); //假设这是从数据库取内容 $arr=["prod_id"=>103,"prod_name&quo ...