Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
A simple inline calendar, date selection tool for aiogram telegram bots written in Python.
Offers two types of date pickers:
Navigation calendar - user can either select a date or move to the next or previous month/year by clicking a singe button.
Dialog calendar - user selects year on first stage, month on next stage, day on last stage.
From version 0.2 supports aiogram 3, use version 0.1.1 with aiogram 2.
Install package
pip install aiogram_calendar
A full working example on how to use aiogram-calendar is provided in *bot_example.py*
.
In example keyboard with buttons is created.
Each button triggers a calendar in a different way by adding it to a message with a reply_markup.
reply_markup=await SimpleCalendar().start_calendar()
^^ will reply with a calendar created using English localization (months and days of week captions). Locale can be overridden by passing locale argument:
reply_markup=await SimpleCalendar(locale='uk_UA').start_calendar()
or by getting locale from User data provided by telegram API using get_user_locale method by passing message.from_user
to it
reply_markup=await SimpleCalendar(locale=await get_user_locale(message.from_user)).start_calendar()
Depending on what button of calendar user will press callback is precessed using the process_selection method.
selected, date = await SimpleCalendar(locale=await get_user_locale(callback_query.from_user)).process_selection(callback_query, callback_data)
Here locale is specified from callback_query.from_user
FAQs
Simple Inline Calendar & Date Selection tool for Aiogram Telegram bots
We found that aiogram-calendar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.