Skip to main content

Note: This is not pyTelegramBotAPI, but do to often confusion I have included it within this package. So if you accidentally install this instead of pyTelegramBotAPI the examples, etc will still work.

This originally was telegram bot library, with simple route decorators, and will now be imported as telebot_router, to separate pyTelegramBotAPI and this package from collision.

Currently a work in progress, doesn’t do much now, but will register and send messages.

Example Setup

from telebot_router import TeleBot

app = TeleBot(__name__)


@app.route('/command ?(.*)')
def example_command(message, cmd):
    chat_dest = message['chat']['id']
    msg = "Command Recieved: {}".format(cmd)

    app.send_message(chat_dest, msg)


@app.route('(?!/).+')
def parrot(message):
   chat_dest = message['chat']['id']
   user_msg = message['text']

   msg = "Parrot Says: {}".format(user_msg)
   app.send_message(chat_dest, msg)


if __name__ == '__main__':
    app.config['api_key'] = 'xxxxxxxx:enterYourBotKeyHereToTest'
    app.poll(debug=True)

Metadata

Release files for telebot 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for telebot 0.0.5
File Size Uploaded
telebot-0.0.5.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for telebot 0.0.5
File Interpreter ABI Platform
telebot-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 kB

Release files / telebot-0.0.5.tar.gz

Download URL telebot-0.0.5.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
848a5885b57247b65edd0e92647b4372ebd8d41611dca3f344788c11deac2571
BLAKE2b-256 checksum
How to use checksums
1f3be4188cffaf370f432f15d518cbb53a438200ee7ef68c6db1acab337634e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.4

Release files / telebot-0.0.5-py3-none-any.whl

Download URL telebot-0.0.5-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50327c240243480d40ade4ea5bea4f464bf57d4ff000ea669fcd705396074863
BLAKE2b-256 checksum
How to use checksums
ad2fd8d669be86c42dd2075d7b25bb6de73a3181661a79ef6a3c53dc811f17a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page