======================= JPush API Python Client
JPush's officially supported Python client library for accessing JPush APIs.
JPush Rest API Documents: http://docs.jpush.io/server/rest_api_v3_push/
You can download the latest release file here: https://github.com/jpush/jpush-api-python-client/releases
Installation
To install jpush-api-python-client, simply:
$ sudo pip install jpush
or alternatively install via easy_install:
$ sudo easy_install jpush
or from source:
$ sudo python setup.py install
Testing
For running the tests, you need the standard unittest module, shipped
with Python.
To run jpush-api-python-client tests, simply:
$ nosetests tests/push tests/devices --verbosity=2
Examples
You can see more examples in https://github.com/jpush/jpush-api-python-client/blob/master/examples
Simple iOS Push
>>> import jpush as jpush
>>> from conf import app_key, master_secret
>>> _jpush = jpush.JPush(app_key, master_secret)
>>> push = _jpush.create_push()
>>> push.audience = jpush.all_
>>> ios_msg = jpush.ios(alert="Hello, IOS JPush!", badge="+1", sound="a.caf", extras={'k1':'v1'})
>>> android_msg = jpush.android(alert="Hello, android msg")
>>> push.notification = jpush.notification(alert="Hello, JPush!", android=android_msg, ios=ios_msg)
>>> push.options = {"time_to_live":86400, "sendno":12345,"apns_production":True}
>>> push.platform = jpush.platform("ios")
>>> push.send()
Get taglist
>>> import jpush as jpush
>>> from conf import app_key, master_secret
>>> _jpush = jpush.JPush(app_key, master_secret)
>>> device = _jpush.create_device()
>>> device.get_taglist()
Questions
The best place to ask questions is our community site: http://community.jpush.cn/
Metadata
Release files for jpush 3.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jpush-3.4.0.tar.gz | 14.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jpush-3.4.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 30.0 kB
Release files / jpush-3.4.0.tar.gz
| Download URL | jpush-3.4.0.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
248688ae6964597ba6d79ee883a5f98a22fba335e6454760d7faa6973643f0cc
|
|
BLAKE2b-256 checksum How to use checksums |
70abe495311a48c25c9e3bb4dc68df7550c3a828fde1be1de46048803c99de46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / jpush-3.4.0-py2.py3-none-any.whl
| Download URL | jpush-3.4.0-py2.py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e31f61cce767694537567c59a72de17ff8f57d77f3532788f6d6787a8412178e
|
|
BLAKE2b-256 checksum How to use checksums |
1499accba922302da5d9e0295173e86b91e0669ac844609cbbfafeb0450532ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|