Skip to main content

Notification on instant messaging platforms

Project description

NotifyHub

Library to send you messages from your python scripts.

Setup

For contributors:

conda create -n notifyhub python==3.6.6  # works with RPi
conda activate notifyhub
pip install -r requirements.txt

For users:

cd ..  # parent directory
pip install notifyhub

Usage

from notifyhub import send, watch

CONFIG_FP = '<CONFIG_FP>'  # config .json file
send(message="hello there", config_fp=CONFIG_FP)  # sends message 'hello there'


# watch program to check if it crashes/completes
@watch(config_fp=CONFIG_FP)
def main():
    print('do something')

Telegram

Your telegram configuration file should look like:

{
    "bot": "telegram",
    "bot-token": "<BOT TOKEN>",
    "chat-id": <CHAT ID>
}

Discord

Your discord configuration file should look like:

{
    "bot": "discord",
    "bot-token": "<BOT TOKEN>",
    "chat-id": <CHANNEL ID>
}

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

notifyhub-0.0.5.tar.gz (3.9 kB view hashes)

Uploaded Source

Supported by

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