Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onepush-1.8.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onepush-1.8.1-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file onepush-1.8.1.tar.gz.

File metadata

  • Download URL: onepush-1.8.1.tar.gz
  • Upload date:
  • Size: 10.1 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

Hashes for onepush-1.8.1.tar.gz
Algorithm Hash digest
SHA256 79c5338b998b85c2e9206abf277554b0886789bdb6d54671797c89bf222e03d8
MD5 1e20989b2a01c14c21730c1bc0821ee7
BLAKE2b-256 38892a30dfd45af5d7e04965de57b32525865fcd5e18a8667906f051033cc849

See more details on using hashes here.

File details

Details for the file onepush-1.8.1-py3-none-any.whl.

File metadata

  • Download URL: onepush-1.8.1-py3-none-any.whl
  • Upload date:
  • Size: 18.4 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

Hashes for onepush-1.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 423318d744a83510fedaa31b4cf2cf399eda9b39da7b17583cb1c879e5240449
MD5 4d96d75a7bdaf25d56bdd560c0e2f3b1
BLAKE2b-256 09d62e65394229c93c5718617f73bb0be5d5f97711b1d0b58dd9ae909239c1c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page