A Python library to send notifications to your iPhone, Discord, Telegram, WeChat, QQ and DingTalk.
Project description
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(key='YOUR_BARK_KEY', title='OnePush', content='Hello World!')
print(response.text)
# {'required': ['key'], 'optional': ['title', 'content', 'sound', 'isarchive', 'icon', 'group', 'url', 'copy', 'autocopy']}
# {"code":200,"message":"success","timestamp":1633528319}
Or:
from onepush import notify
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',
key='YOUR_BARK_KEY',
title='OnePush',
content='Hello World!',
proxies=proxies)
The proxies parameter accepts the same format as the requests library.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file onepush-1.7.0.tar.gz.
File metadata
- Download URL: onepush-1.7.0.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efa22246375fa6978f7c65065e83e41724adef5189567e50aa93d1a61d0978ee
|
|
| MD5 |
b0d793db61635f511202dae5723c41bc
|
|
| BLAKE2b-256 |
5061774edaf98baa7c0c48aa52eef53fa968849bb773640217b8349de1c1b48a
|
File details
Details for the file onepush-1.7.0-py3-none-any.whl.
File metadata
- Download URL: onepush-1.7.0-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6d794eecf6095236362dec463c766de8838b59ab69a4dbc098f219d32ee6ad6
|
|
| MD5 |
b0ea244f159e9201647e1645b95f4f56
|
|
| BLAKE2b-256 |
39d6eae0c95d6c97c52b6afca97fae88c64f721d0fb46ffd6f5c437c285ccda4
|