用于轻松访问leaseweb api的python客户端库

lswapi的Python项目详细描述


https://travis-ci.org/nrocco/lswapi.svg?branch=master

python模块与leaseweb的api对话。

有关更多信息,请参阅 [http://developer.leaseweb.com]

安装

使用pip安装模块:

pip install lswapi

用法

函数创建leaseweb api的一个实例 使用x-lsw-auth键的对象。可以将api密钥作为参数提供 获取最新的API

$ python
>>> import lswapi
>>> client = lswapi.get_leaseweb_api(api_key="xxxx-xxx-xxxxxx")
>>> response = client.get("/bareMetals/v2/servers")
>>> servers = response.json()

或者作为环境变量

$ LSW_API_KEY=xxxx-xxxx-xxxxx python
>>> import lswapi
>>> client = lswapi.get_leaseweb_api()
>>> response = client.get("/bareMetals/v2/servers")
>>> servers = response.json()

贡献

  1. 叉开它
  2. 创建您的功能分支(git checkout-b my new feature
  3. 提交更改(git commit-am'add some feature'
  4. 确保测试通过(进行测试
  5. 推到分支(git push origin my new feature
  6. 创建新的拉取请求

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

推荐PyPI第三方库


热门话题
java GWT对话框从不显示帮助   java在简单的MapReduce作业中带来了极大的开销   javacom。mysql。jdbc。例外情况。jdbc4。MySQLIntegrityConstraintViolationException:列不能为null/onetoone映射   如何通过TCP/IP与Java和Labview进行通信,并发送浮点数据缓冲区?   java Apache camel与spring事件基本示例   java如何使我的秒表应用程序在完全关闭后仍能运行?   java Nutch爬网错误输入路径不存在   java是Mapreduce中按值传递还是按引用传递的键?   正则表达式替换java中的特定字符   Java DOM XML解析   java Eclipse未显示服务器的项目   使用Arraylist进行快速排序的排序Java实现疑难解答   java Split text包含字符串列表中的数字   检查Java中的两个lambda是否执行相同的代码?   java为什么dispatchTouchEvent避免在屏幕上单击?