xinge Push API for Python(http://xg.qq.com).
Project description
xinge-api-python
概述
欢迎使用信鸽 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 details)
Built Distribution
xinge-2.0.4-py3-none-any.whl
(16.2 kB
view details)
File details
Details for the file xinge-2.0.4.tar.gz
.
File metadata
- Download URL: xinge-2.0.4.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 173ee08a737e498de855749842987e71e4fa4775a929de0f828cf0050456b16f |
|
MD5 | 9903f98cf18df45a0f5d30034419cf33 |
|
BLAKE2b-256 | 07526925f6ddd1f0cdbc39acc4134fd58b314aeccff26e4c3db71580395eba28 |
File details
Details for the file xinge-2.0.4-py3-none-any.whl
.
File metadata
- Download URL: xinge-2.0.4-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d2dd7eeba8a2e30c2edf21eeba6e523eedd4b87ccdd0b36adb25d547018700e |
|
MD5 | 3bde67f7f53b70dc030776adb88c65c3 |
|
BLAKE2b-256 | cbac994f84504f29fba8d3c50e7cb0cf3d7c5da3ee0342afe416c607fd4fcc3e |