akamai的netstorage api通信工具包

NetStorageKit的Python项目详细描述


https://img.shields.io/pypi/status/NetStorageKit.svg?style=flat-square

用法

tests详细描述了用法,但请考虑此上载 例子。

importnetstoragekitasns# NetStorage connection information# The host part is prepended to -nsu.akamaihd.net, i.e. mycdn-nsu.akamaihd.nettest=dict(key_name='abc',key='abcdefghijk1234'cpcode='12345',host='mycdn')# Create a Request instancerequest=ns.api.Request(test['key_name'],test['key'],test['cpcode'],test['host'])remote_path='media/images/products/123.jpg'local_path='/opt/data/products/123.jpg'# Upload the local path to the remote one (always relative to the CPCode)# The returned data is the XML returned by the API parsed as a python object# The response is the object as returned by the requests packagedata,response=request.upload(remote_path,local_path)

安装

发展

pip install autoenv
pip install virtualenv
virtualenv -p /usr/bin/python2.7.9 env
source env/bin/activate
python setup.py install
# Run tests
py.test tests.py

产量

pip install netstoragekit

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java例外。Lang.Stringindexoutofboundsexception索引超出范围(0)   java Spring引导Freemarker从2.2.0升级失败   重构Java反模式名称?包含对象的对象包含。。。等   用java处理JDBC可能出现的死锁的最佳方法   java无法访问主线程上的数据库,因为它可能会在很长一段时间内锁定UI   java如何将固定大小的画布包装在边框窗格中的滚动窗格居中?   java解析xsd文件后得到空结果   在html页面中表示XML文件的java   socketjava对象流   sql Java越界异常数据库   JavaJBoss7.1.1不会在Mavericks上启动   Twincat ADS事件驱动读取在一段时间后停止工作(Java)   java MyBatis使用生成的ID插入所有   Mojave上缺少MacOS Java控制面板   JavaGuice:如果多次注入相同的依赖项,是否注入了该依赖项的相同实例?