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. osg 路径 动画 效果

    osg 路径 动画 效果 转自:http://blog.csdn.net/zhuyingqingfen/article/details/8248157 #include <osg/Group&g ...

  2. (转)C#特性学习与使用(为枚举定义Description)

    参考:http://blog.csdn.net/nndtdx/article/details/6905802#comments

  3. 前端自动化工具 -- fis 使用简介

    https://github.com/fex-team/fis FIS入门: http://fis.baidu.com/docs/beginning/getting-started.html FIS ...

  4. 11877 The Coco-Cola Store

    题目:    11877  The Coco-Cola Store Once upon a time, there is a special coco-cola store. If you retur ...

  5. 清除BOM头源码

    BOM: Byte Order Mark UTF-8 BOM又叫UTF-8 签名,其实UTF-8 的BOM对UFT-8没有作用,是为了支援UTF-16,UTF-32才加上的BOM,BOM签名的意思就是 ...

  6. [LintCode] Valid Number 验证数字

    Validate if a given string is numeric. Have you met this question in a real interview? Yes Example & ...

  7. [LintCode] Length of Last Word 求末尾单词的长度

    Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the l ...

  8. Winform Combox DataSource 之不显示 displayemember 内容

    刚开始学习数据绑定的东西, private void Form1_Load(object sender, EventArgs e) { IList<TLayer> tt = new Lis ...

  9. mysql语句中有引号的问题解决方案

    在mysql的查询.修改.插入.删除的sql语句里有引号如何处理? 例如: <? $name = "my name is xcxc"; $people = "i'm ...

  10. c#前3章总结

    01.net和c#的区别 大概在2000年,微软推出了一种革命性的产品--.NET(战略) 目标:任何人,在任何地方,使用任何终端设备,都可以访问微软提供的服务. .net Framework:要想让 ...