~/talk

An introduction to async programming - Writing a Telegram Antispam Bot in Python

Talkat PyCon UK 2022 · 2022-09-16..09-18· at 15:00· Assembly Room· [concurrency]
links:none on file
slides:none on file

Quick intro to async concepts (event loop, coroutines, async/await, asyncio.create_task and asyncio.sleep) followed by a concrete Telegram antispam bot built with Pyrogram and released at https://github.com/eGenix/egenix-telegram-antispam-bot. Bot runs in production since April, bans 390 spam sign-ups from a ~150-member group, saves an estimated ~13 hours of manual moderation, uses async I/O with fallbacks to threads for blocking libraries, and demonstrably works.

AI-written summary · about

  1. 0:00Start
  2. 1:03Motivation: Writing a Telegram Antispam Bot
  3. 5:36Python: Global Interpreter Lock (GIL)
  4. 7:05Python: Threaded code on multiple cores/threads
  5. 8:01Python: Threaded code - a closer look
  6. 8:22Python: Asynchronous to saturate a single core/thread
  7. 9:22Asynchronous programming in Python
  8. 10:38async+ await: Example
  9. 11:59The asyncio module: a closer look
  10. 14:02Running async: the Event Loop
  11. 16:21Async eco system: Low level
  12. 17:52Async eco system: High level
  13. 19:11Implementation of the Bot
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.