Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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.

Files for xinge, version 2.0.4
Filename, size File type Python version Upload date Hashes
Filename, size xinge-2.0.4-py3-none-any.whl (16.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size xinge-2.0.4.tar.gz (12.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page