Skip to main content

xinge Push API for Python(http://xg.qq.com).

Project description

xinge-api-python

PyPI version

概述

欢迎使用信鸽 ServerSDK - Python 版本封装的开发包,具有最新版本的信鸽 API 功能。

兼容版本

  • Python 3.7
  • 需要使用到 requests
  ~ pip install requests
  • 如需运行测试用例,需要安装 unittest
pip install unittest2

引用 SDK

  pip install xinge

代码示例

from xinge_push import Xinge, Message

xinge = Xinge('app id', 'secret key')
message = Message(title="some title", content = "some content")
xinge.push_account(platform="android", account="some account", message=message)
ret_code, error_msg = xinge.push_account(platform="android", account="some account", message=message)
if ret_code:
    print "push failed! retcode: {}, msg: {}".format(ret_code, error_msg)
else:
    print "push successfully!"

Publish

python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*

Project details


Download files

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

Source Distribution

xinge-2.0.4.tar.gz (12.4 kB view hashes)

Uploaded Source

Built Distribution

xinge-2.0.4-py3-none-any.whl (16.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page