Skip to main content

maxwin 框架的sdk

Project description

mwsdk
=====

maxwin 团队常用的服务,包括 kong,rightmanage等,直接从 consul 中读取服务信息

Kong 的使用:
------------
.. code-block:: python

from mwsdk import Kong
# 创建kong 服务
k = Kong()
# 向kong注册服务,需jwt认证
k.reg_service('monitor-srv/api/v1.0','192.168.101.88:8999',auth='jwt',kong_uris='monitor-srv/api')
# 向kong注册upstream和tagert,增加负载平衡
k.add_upstream_target('monitor-srv','192.168.101.88:8999',50)
k.add_upstream_target('monitor-srv','192.168.101.99:8888',50)
# 把upstream 注册到kong,不需要认证
k.reg_service('monitor-srv/api/doc','monitor-srv',auth='',kong_uris='monitor-srv/doc')


Rightmanage的使用:
------------------

.. code-block:: python

from mwsdk import Rightmanage_inner
# Rightmanage为内网的 权限服务,不需要认证
rm = Rightmanage_inner()
# 获取权限资料
status_code,rm_json = rm.permissions('maxwin_web','admin.id')

AIORightmanage_inner 的使用
---------------------------
- 支持async,方法同 Rightmanage

安装方法
--------
``pip install mwsdk``

Changes
=======

0.2.2 (2018-10-25)
------------------

- 增加 kong.add_upstream_target,支持kong的upstream


0.2.0 (2018-09-29)
------------------
- 增加 AIORightmanage_inner和Rightmanage_inner 类

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mwsdk, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size mwsdk-0.2.2.tar.gz (6.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page