
Register a Telegram user, locate BotFather, and create a new Telegram bot named Udemy Telegram course bot, then copy its token and begin setting up the development environment.
There is a new version of "python-telegram-bot" lib which is not backward compatible.
Accordingly, for the course purposes please install the particular version 13.14.
The command which can be used:
pip install python-telegram-bot~=13.14
Learn why Python is beginner friendly with simple syntax and a short learning curve. Explore its use in data science, machine learning, scripting, and Telegram bots.
Identify Python's reserved keywords, understand case sensitivity, and learn rules for valid identifiers. Apply naming guidelines, avoid starting identifiers with digits, and use underscores to separate words for readability.
Master Python statements, indentation, and comments to structure code with line continuation and docstrings. Explore how indentation replaces braces for clean, readable programs.
Explore Python's flow control and loops, including if, elif, else, and indentation rules, with examples of for and while loops, range, break, continue, and pass.
Learn how to define, call, and return values with python functions. Explore def headers, function names, arguments with defaults, arbitrary arguments, and the difference between global and local scope.
Learn object oriented programming in Python, where classes blueprint objects with attributes and methods. Explore self, __init__ constructors, and the role of garbage collection in object lifecycle.
Master the Python datetime module to work with date, time, and timedelta, obtain the current date and time with now, and format or parse strings with strftime and strptime.
Define the goals of a full stack Telegram bot by enabling user reminders, storing them in memory, and scheduling cron-based notifications, while extracting the token to an environment variable.
Explore the core functionality of the python-telegram-bot module by examining Updater, Dispatcher, and the CommandHandler, MessageHandler, and ConversationHandler. Learn how to manage updates, context, and keyboards.
Enter time handler combines message and time into a reminder object, stores it in an in-memory dictionary using chat id as the key, and notifies the user when saved.
Discover how threads enable concurrent execution via context switching, and how to create and manage threads with the thread class, start and join methods, including daemon behavior.
Implement a cron-like background task using python threading to scan reminders, use a fired flag and time check to fire messages, and run every 30 seconds in a daemon thread.
Install postgres and psql, create the udemy_telegram database and udemy_telegram_user with a password, grant privileges, and prepare code to interact with the database.
Learn to implement a postgres-backed data source in Python using psycopg2, with logging, connect/close helpers, create_tables, and methods to create, fetch, and fire reminders.
Configure the database url, switch to a new data source, create tables with if not exists, convert times with datetime, and refactor reminders to ReminderData, then run the bot.
Connect to Postgres and inspect the database with psql, listing tables with \dt. Create the reminders table and verify fired becomes true as the background task runs.
Deploy and manage apps with Heroku, pushing to the Heroku remote using Git to run web and worker dynos defined by a Procfile, with add-ons, variables, and logs via Logplex.
Deploy a Telegram bot to Heroku by creating an app, adding configuration files, and pushing main after logging in. Then configure environment variables and Postgres to finalize server readiness.
Set up a Postgres add-on on Heroku, create and connect the database, and auto-configure the database url while adding required environment variables like the token.
Refactor the bot to run on the server using a webhook in prod while retaining polling for development, configure mode, logging, and environment variables, and deploy to Heroku.
Monitor your app with heroku logs, view processes, and inspect access events. Create and run sql queries using dataclips on heroku postgres to fetch table data such as reminders.
Finish the course by refining a Telegram bot from scratch, connecting a Postgres database, and deploying on Heroku. Improve accessibility and security with time zone support, emojis, and encrypted messages.
Learn how to migrate Python Telegram bot from version 13 to 20, adopting the Application entry point, async IO, and coroutine-based handlers to build a modern, immutable bot.
Migrate the Telegram bot to version 20 by upgrading the library, updating imports, and using async handlers with run_polling and run_webhook, then deploy to Heroku and test a reminder.
Welcome to the course!
In this course you will:
create your own Telegram bot from scratch
build PSQL database and write all basic SQL queries
deploy Python application to the Heroku server and work with its features
It's designed for anyone who wants to learn how to build your first custom telegram bot with a connected database and deployment to the popular web server.
I'll take you step-by-step through engaging video tutorials and teach you everything you need to know to succeed.
The course includes 2 hours of HD video tutorials with clear captions and builds your programming knowledge while making real and functional bot.
Throughout this course, we cover a massive amount of tools and technologies, including:
Python 3 - the latest version of Python
Python multithreading topic
PyCharm
Telegram API
python-telegram-bot, and psycopg2 python modules
Database PostgreSQL
Git, GitHub and Version Control
Deployment and Heroku
and much more!
By the end of this course, you will be programming in Python completely your own and custom bot! It will be able to store any information you want in a dedicated database! And it will be available for any Telegram user!
Telegram is the way of the future, accordingly, why not build a useful bot which will make someone's life easier!
So what are you waiting for?