======================= 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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| jpush-3.4.1.tar.gz | 15.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jpush-3.4.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 32.0 kB
Release files / jpush-3.4.1.tar.gz
| Download URL | jpush-3.4.1.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
751ba3e2f5430e8c4ad867adc3e1552ff1bcd8a3b3d53422e9b212e6a4cbdb2b
|
|
BLAKE2b-256 checksum How to use checksums |
2be53416456d8501101f8d18224345f3509f12391fd1639e1bbbab093d4c7063
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / jpush-3.4.1-py2.py3-none-any.whl
| Download URL | jpush-3.4.1-py2.py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
394b597e8ae5e244aba9b937e663caad059ce5179df1bd94a65c4f584bf15d27
|
|
BLAKE2b-256 checksum How to use checksums |
990b1a67070fcade0f75ea7b67bfd87f365e3036637f0fc57d0fa036c240d1d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for jpush 3.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.