onepush
A Python library to send notifications to your iPhone, Discord, Telegram, WeChat, QQ and DingTalk.
Supported providers
Bark, Discord, Telegram, ServerChan, ServerChanTurbo, WechatWorkApp, WechatWorkBot, pushplus, go-cqhttp, Qmsg, DingTalk, Lark, SMTP, Customised providers
Installation
Via pip:
pip install onepush
Or via source code:
git clone https://github.com/y1ndan/onepush.git
cd onepush
python setup.py install
Basic Usage
from onepush import get_notifier
n = get_notifier('bark')
print(n.params)
response = n.notify(device_key='YOUR_BARK_KEY', title='OnePush', content='Hello World!')
print(response.text)
# {'required': ['device_key'], 'optional': ['title', 'subtitle', 'body', 'markdown', 'device_key', 'device_keys', 'level', 'volume', 'badge', 'call', 'autoCopy', 'copy', 'sound', 'icon', 'image', 'group', 'ciphertext', 'isArchive', 'url', 'action', 'id', 'delete', 'cipherkey', 'ciphermethod', 'base_url', 'content', 'key']}
# {"code":200,"message":"success","timestamp":1633528319}
Or:
from onepush import notify
notify('bark', device_key='YOUR_BARK_KEY', title='OnePush', content='Hello World!')
You can also use the alias key for device_key:
notify('bark', key='YOUR_BARK_KEY', title='OnePush', content='Hello World!')
Proxy Support
You can use proxy with any notifier by adding the proxies parameter:
# Using HTTP/HTTPS proxy
proxies = {
'http': 'http://127.0.0.1:7890',
'https': 'socks5h://127.0.0.1:7890'
}
notify('bark',
device_key='YOUR_BARK_KEY',
title='OnePush',
content='Hello World!',
proxies=proxies)
The proxies parameter accepts the same format as the requests library.
Metadata
Release files for onepush 1.10.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 | Provenance | |
|---|---|---|---|---|
| onepush-1.10.0.tar.gz | 13.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| onepush-1.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.2 kB
Release files / onepush-1.10.0.tar.gz
| Download URL | onepush-1.10.0.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd3c508b05341d7f2ea05b14a640defaebb3d9ddc5aafedf86d01b91ca9492b0
|
|
BLAKE2b-256 checksum How to use checksums |
2abc9f727c8abba09457e741ab7373b27b142aa1eae2944acd7f879db9f8d055
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / onepush-1.10.0-py3-none-any.whl
| Download URL | onepush-1.10.0-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
afbf2524a52744f1cf1663fcd8375c9107289dfccd11fdbd92208ffb1293306d
|
|
BLAKE2b-256 checksum How to use checksums |
5450869e6b690e0913e35ef2dd4bc8496e378266ff850401ecb4f08c4940d5db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for onepush 1.10.0
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.