Python3 telegram bot to retrieve public IP of the Telegram bot's host machine.
Project description
telegramgetbotip
Python3 telegram bot to retrieve public IP of the Telegram bot's host machine.
Rationale:
Sometimes a DynDNS is an overkill. This bot is designed to cover the use case where you just need the IP of a network.
Installation
Install with pip
python3.8 -m pip install --user -U telegramgetbotip
Usage
From shell:
$ python3.8 telegramgetbotip -h
usage: telegramgetbotip [-h] [-v] [-t TOKENFILE] [-i IDSFILE] [-d DELTA]
Telegram Bot to get the public IP where the bot is hosted on.
optional arguments:
-h, --help show this help message and exit
-v, --verbose Verbosity.
-t TOKENFILE, --tokenfile TOKENFILE
Bot token file.
-i IDSFILE, --idsfile IDSFILE
Allowed Telegram IDs file.
-d DELTA, --delta DELTA
Time between queries.
The Bot Token file must contain the bot ID in JSON format. { "token": "token_string" (str) }
The ids's file must contain the IDs in JSON format. { "name": id (int) }
You can get your Telegram ID from @userinfobot You can register your Telegram Bot from @BotFather
From the interpreter:
help(telegramgetbotip)
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
File details
Details for the file telegramgetbotip-0.1.4.tar.gz
.
File metadata
- Download URL: telegramgetbotip-0.1.4.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3394250b7d7ec3d46f9971669b1dd745af01b0f3594dcd6441d910ad68695f2a |
|
MD5 | 3a829acb501a87c232f60a3fca4cccf8 |
|
BLAKE2b-256 | 6f0ad58f3d0b313bf16310ba409c8bc6e84f88a31b26f909750252fd7d0a5d58 |