#apscheduler

This is so weird. I've backports.zoneinfo listed in my #Python #pip requirements file, and it installed it just fine. Yet, I got errors (from #APScheduler) saying that I don't have it installed, despite being in the right environment/using the same interpreter and whatnot.

I investigated further and deduced that it's probably bcos for some reason... the module is listed/found on the system (container) as
backports-zoneinfo instead, not backports.zoneinfo - hence, the pkg_resources.DistributionNotFound error. For one, idek how this is happening cos I've another container that should be (for the most/relevant part at least) identical with the same requirements.txt file, environment and everything, and yet I've encountered no issues there and pkg_resources did find it as backports.zoneinfo (not with hyphen).

This is actually so freaking weird and wasting my time, big time.

---

edit:

As mentioned, this package should be identical in both containers (same version, same install location/method etc.) - even their names are identical in
pip freeze, it's only when investigating with pkg_resources I've found where their names are different (again, no idea how this is the case - they're the same containers for the most part).

Noticing another difference tho between them:

the not ok container:

(venv) /base # ls -l /venv/lib/python3.8/site-packages/backports.zoneinfo-*.dist-info
ls: /venv/lib/python3.8/site-packages/backports.zoneinfo-*.dist-info: No such file or directory

the ok container:
(venv) /base # ls -l /venv/lib/python3.8/site-packages/backports.zoneinfo-*.dist-info
total 40
-rw-r--r--    1 root     root             4 Mar 10 17:36 INSTALLER
-rw-r--r--    1 root     root           592 Mar 10 17:36 LICENSE
-rw-r--r--    1 root     root         11357 Mar 10 17:36 LICENSE_APACHE
-rw-r--r--    1 root     root          4759 Mar 10 17:36 METADATA
-rw-r--r--    1 root     root          1896 Mar 10 17:36 RECORD
-rw-r--r--    1 root     root             0 Mar 10 17:36 REQUESTED
-rw-r--r--    1 root     root           102 Mar 10 17:36 WHEEL
-rw-r--r--    1 root     root            10 Mar 10 17:36 top_level.txt

---

edit:

oh nvm, it's not missing on the not ok container - just, affected by the somehow different name for wtv reason.
/venv/lib/python3.8/site-packages/backports_zoneinfo-0.2.1.dist-info:
total 40
-rw-r--r--    1 root     root             4 Mar 12 14:33 INSTALLER
-rw-r--r--    1 root     root           592 Mar 12 14:33 LICENSE
-rw-r--r--    1 root     root         11357 Mar 12 14:33 LICENSE_APACHE
-rw-r--r--    1 root     root          4759 Mar 12 14:33 METADATA
-rw-r--r--    1 root     root          1896 Mar 12 14:33 RECORD
-rw-r--r--    1 root     root             0 Mar 12 14:33 REQUESTED
-rw-r--r--    1 root     root           102 Mar 12 14:33 WHEEL
-rw-r--r--    1 root     root            10 Mar 12 14:33 top_level.txt

2025-01-13

FastAPI и Vue.js 3: телеграм-бот с MiniApp для записи и автоматических уведомлений. Пишем бэкенд

Сегодня я рад представить новый масштабный проект, в рамках которого мы подробно рассмотрим технологии и подходы, ранее не освещенные в моих статьях. На этот раз мы создадим телеграм-бота с MiniApp (ранее известным как WebApp) — это будет бот с интегрированным мини-сайтом прямо в Telegram. Для реализации проекта мы используем два основных фреймворка: 1. FastAPI — мощный Python-фреймворк, который мы задействуем для разработки API нашего телеграм-бота. Мы рассмотрим уникальный подход, позволяющий создать полноценный бэкенд, который будет закрывать как API-методы, так и функционал телеграм-бота. 2. Vue.js 3 — JavaScript-фреймворк, выбранный за его удобство разработки и возможности создания сложных визуальных элементов. В этой статье мы сосредоточимся на описании бэкенда, а создание приложения на Vue.js 3 будет вынесено на следующую статью.

habr.com/ru/companies/amvera/a

#fastapi #sqlalchemy #sqlalchemy_20 #telegram_bot #telegram_bot_api #telegram_mini_app #telegram_web_app #telegram_web_app_bot #apscheduler #python

2024-09-13

Одинь день — одна тема
2/365

Інтернет радіо

Почав з того що обговорювалась тема радіо тут на мастодоні. Може хто знає про таке радіо як Radio Social Net Ua⁴. Воно гоститься адміном Мастодон примірника (істанса) social.net.ua¹. Недавно з'явилось ще одне радіо Балакучий рок² від користувача мастодона з допомогою адміна. І ось я вирішив подивитись в репозиторій³ (є лінк на radio.social.net.ua), щоб розібратись як захостити і собі. Доволі багато взнав і так до кінця не розібрався. Ось список техноголій які треба знати:

  • icecast — для стрімінгу
  • flask - pyhhon фреймщорк
  • docker - контейнер
  • ASGI (Asynchronous Server Gateway Interface) — для підримання користувачів і веб інтерфейсу
  • flask-apscheduler — для оновлення інтерфейсу
  • supervisord — управляти процесами (веб сервер, радіо стрімінг сервер)
  • і купа іншого

В планах запустити локально.

¹ social.net.ua
² radio.thx8te.kh.ua/public/chat
³ github.com/uanet-exception/rad
radio.social.net.ua

#257день #темадня #радіо #українськерадіо #python #flask #docker #asgi #apscheduler #supervisord #програмування #devops

2024-06-10

Telegram Боты на Aiogram 3.x: Первые Шаги

Привет, друзья! За свою практику программирования я успел написать множество малых, средних и крупных проектов, преимущественно в формате Telegram-ботов. Моя история началась с популярной на то время версии aiogram 2.24 (тех, кто в теме, поймут), а сейчас я полностью перешел на версию 3.x, о чем нисколько не жалею. В этом посте я хочу начать делиться с вами своим опытом разработки Telegram-ботов через библиотеку aiogram. Сейчас вы читаете вводный пост по этой обширной, но на самом деле не такой уж и сложной теме. Если я увижу положительный отклик, то пойму, что эта информация вам полезна, и мы будем углубляться в разработку ботов все дальше и дальше. Сегодня мы научимся:

habr.com/ru/articles/820527/

#aiogram #aiogram3 #telegram #telegrambot #postgres #postresql #apscheduler

2023-12-22

A lot of my apps require a scheduler, I've always given the option to choose between using #APScheduler or #Celery/#Redis for that. So tempted to drop Celery though because of just HOW MUCH RESOURCES it needs to even work, and when it doesn't work it's all silent about it. In my #helm charts, I could set very low (default) resource limits because they've been tested to work/be sufficient with APScheduler and the rest of the app - because of Celery though, I'd need to set a much higher default.

2023-05-26

I still have no idea how #APScheduler could work so resiliently in one #Django app of mine, and not work at all in another - when they're both set up the exact same way. How is that possible?

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst