This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
kscore
========

A low-level interface to a growing number of KSC Web Services. Reference from botocore.

`Documentation <http: www.ksyun.com="" doc="" search?word="API">`__

----------------
安装
----------------

+ pip 安装
+ pip install kscore
+ github 安装
+ https://github.com/liuyichen/kscore 下载
+ python setup.py install

----------------
Credentials 配置
----------------

+ 参考examples内示例

+ 配置文件: ``.kscore.cfg``

+ 所在位置: '/etc/kscore.cfg' 或 './.kscore.cfg' 或 'C:\\kscore.cfg'

+ 注意: 使用相对路径时,需与运行目录保持一致。
::

[Credentials]
ks_access_key_id=AKLTyW1V6ZWET7aIvdCeIH1cwQ
ks_secret_access_key=OEoTK4IgEBIq3rlFsbpcNDs87w513D6aOwdXxP6QHuvWlonSRYeKQyTzqc1XkUvpuQ==


+ 或运行时配置
+ session.set_credentials(access_key_id, secret_access_key, session_token=None)

----------------
Service 使用
----------------

+ IAM

::

from kscore.session import get_session

if __name__ == "__main__":
s = get_session()

client = s.create_client("iam", use_ssl=False)

users = client.list_users()

+ KEC

::

from kscore.session import get_session

if __name__ == "__main__":
s = get_session()

client = s.create_client("kec", "cn-beijing-6", use_ssl=False)

client.[your method]()

+ MONITOR

::

from kscore.session import get_session

if __name__ == "__main__":
s = get_session()

client = s.create_client("monitor", "cn-beijing-5", use_ssl=True)

m=client.get_metric_statistics(InstanceID="6f582c78-5d49-438e-bf2d-db4345daf503",Namespace="eip",MetricName="qos.bps_in",StartTime="2016-08-16T17:09:00Z",EndTime="2016-08-16T23:56:00Z",Period="600",Aggregate="Average")

print json.dumps(m,sort_keys=True,indent=4)

+ 更多

::

欢迎补充

------------------
Data 更多服务配置
------------------
+ 参考 https://github.com/liuyichen/kscore/issues
+ ENDPOINT 配置
+ data\\endpoints.yaml

::

version: n
partitions:
- partition:
...
# REGION 列表
regions:
...
# 服务列表
- service:
...

+ SERVICE 配置
+ data\\[service]\\[version]\\service-2.yaml

::

version: n
# API 配置
metadata:
...
# 操作方法
operations:
...
# 请求及返回的结构体
shapes:
...

+ 请参考IAM,KEC等配置

--------------------
TESTS 测试
--------------------

+ 基本接口测试

\tests\acceptance> behave

+ 各服务测试用例

\tests>nosetests --with-xunit --cover-erase --with-coverage --cover-package kscore --cover-xml -v integration

--------------------
Contact Information
--------------------

群 号: 367780788
邮 箱: liuyc.mail@gmail.com
Release History

Release History

1.0.7

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1a2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1a1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
kscore-1.0.7.zip (1.2 MB) Copy SHA256 Checksum SHA256 Source Aug 25, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting