Simple Bot Notifier
Project description
Notifly
Table of Contents
About the package
A Simple Bot to push notifications during an event trigger.
Built With
Install the package
Run the following terminal commands to install the package on the given distros.
- Termux :
pkg install python3
pip3 install notifly
- Ubuntu/Debian
sudo apt install python3-pip
pip3 install notifly
- Arch
sudo pacman -S python3-pip
pip3 install notifly
This may take a while depending on the network speed.
Prerequisites
- Python3
It is preinstalled in Ubuntu 20.04. To check the version use command :
python3 --version
If it is not preinstalled for some reason, proceed here and download as per requirement.
Run the following command in terminal to download the required packags for running the tool locally :
- Using requirements file :
pip3 install -r requirements.txt
- Directly download :
pip3 install requests==2.20.0
Working of the tool
To see how the tool works, create a telegram bot.
- Creating the telegram bot
- Open Telegram messenger, sign in to your account or create a new one.
- Enter @Botfather in the search tab and choose this bot.
Note, official Telegram bots have a blue checkmark beside their name. - Click Start to activate BotFather bot.
- Choose or type /newbot and send it.
- Choose a name for the bot, the bot can be found by its username in searches. The username must be unique and end with the word bot.
- Getting the bot API token
-
Newly created bot
-
Already existing bot
-
- Run sample code
from notifly import telegram
token = input("Enter bot token : ")
bot=notifly.BotHandler(token)
text = input("Enter text message : ")
print(bot.send_message(text))
opt_image = input("Do you want to send image ?")
if(opt_image=='y' or opt_image=='Y'):
img_path = input("Enter full image path : ")
bot.send_image(img_path)
Contributing
- Fork the Project
- Create your Feature Branch
git checkout -b feature/mybranch
- Commit your Changes
git commit -m 'Add something'
- Push to the Branch
git push origin feature/mybranch
- Open a Pull Request
Follow the given commands or use the amazing GitHub GUI
Happy Contributing :smiley:
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
File details
Details for the file notifly-1.1.5.tar.gz
.
File metadata
- Download URL: notifly-1.1.5.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29b2a1dccc7d79b606bb513a0f068c8559f41887bde6009b568fc1d05e35ed47 |
|
MD5 | bc1196ae6b6573d8617e92231f898b3d |
|
BLAKE2b-256 | c812f730fed19480b23c7d4230043803ad6380ef3d448941db980702fb190876 |
File details
Details for the file notifly-1.1.5-py3-none-any.whl
.
File metadata
- Download URL: notifly-1.1.5-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a47950d0dc4895f8a4037a032c55fbb70b5057500ea6567d5235352ddd3b81d8 |
|
MD5 | a23b252101b96914997fe7b3fc95be81 |
|
BLAKE2b-256 | 6033e7d04906ef06da991054caf468ae202bac01a086a961905cfc0085247229 |