I'm new to python and telegram bot programming, and I have been programming a telegram bot using pyTelegramBotAPI because the tutorials I followed used it, but I can't find no information on the internet about a definition/description about pyTelegramBotAPI and why should I use it instead of Telegram Bot API. Can someone help me with these questions? I literally couldn't find these information on the internet. Thanks
pyTelegramBotAPI is a python implementation of the Telegram Bot API.
You're not choosing to use pyTelegramBotAPI instead of the Telegram Bot API - rather you're choosing to use pyTelegramBotAPI for the Telegram Bot API. This is one of numerous Python implementations and Python is just one of many languages that implementations are written in. If you really want, you can operate a Telegram Bot using shell commands.
In general terms, an implementation of a HTTP-based API written in a particular language simplifies building your program by allowing you to specify your ID's and credentials, and then simply calling functions to get things done, instead of having to engineer every call and include the paramaters manually or repetitively. It also takes care of constructing the requests and passing the paramaters in a compatible format to the server, while it may also provide some additional parsing to the paramaters provided to the abstracted functions.
You like the features and functionality of pyTelegramBotAPI. I.e. You're looking for a framework for a project like one of these
You want a Python implementation of the Telegram Bot API without having to build it from scratch yourself.
You want a fairly comprehensive and extensible implementation of the Telegram Bot API (true at the time of writing this)
The Documentation explains what you need to be aware of, and how certain aspects translate to the API. I.e, there's a paragraph explaining the convention of method names has been modified to more idiomatic Python;
Methods
All API methods are located in the TeleBot class. They are renamed to follow common Python naming conventions. E.g.
getMeis renamed toget_meandsendMessagetosend_message.
There's also a note about the renaming of from to from_user
As mentioned above, pyTelegramBotAPI is maintained and updated regularly at the time of writing this. However, there's never a guarantee that code written by someone else will always be maintained in either it's original form or forked off and taken in a new direction.
You may choose against using something like this if:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With