
Hello, checkiomates๐ฑโ๐ค!
This week in Python, we embark on a journey to demystify Asyncio by rebuilding it from the ground up, catch up on the latest enhancements in pip 25.1, and explore advanced Python features that can elevate your coding prowess. Complementing these insights, we present a practical mission to parse crontab timing expressions and calculate upcoming execution datetimes, putting your scheduling logic to the test.
๐กTIP
We allow users to assign hotkeys to "Run Code", "Check Solution" and stop code. You may see current combinations on buttons and change them in editor menu. If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!
๐ MISSION
Crontab Parsing by freeman_lex -
Linux Crontab command is a powerful utility that is used for scheduling and automating tasks in Unix-like operating systems. In this mission your task is to parse a crontab timing expression (crontab format MIN HOUR DOM MON DOW), return a sorted ascending list of next 3 execution datetimes based on a provided current datetime (ISO format YYYY-MM-DDTHH:MM).
assert next_crontab_exec("* * * * *", "2025-03-03T14:30") == [ "2025-03-03T14:31", "2025-03-03T14:32", "2025-03-03T14:33", ] assert next_crontab_exec("*/15 * * * *", "2025-03-03T14:30") == [ "2025-03-03T14:45", "2025-03-03T15:00", "2025-03-03T15:15", ]
๐ ARTICLES
Asyncio Demystified: Rebuilding it From Scratch One Yield at a Time -
Get a better understanding of how asyncio works in Python, by building a lightweight version from scratch using generators and coroutines.
Pip 25.1 introduces support for Dependency Groups, resumable downloads and an installation progress bar. Learn more in the following article.
Edward has collected a series of Python tricks and patterns that he has used over the years. They include typing overloads, generics, protocols, and more.
๐ฉโ๐ปCODE SHOT
What do you think the following code does?
???????? = lambda a, g=__import__("itertools").groupby: [sum(v) for _, v in g(a)]
๐ Thanks for your attention! Hope to meet you at CheckiO, as well as at our Instagram and Twitter! We are really interested in your thoughts! Please, leave a comment below! โคต