Files
project-based-learning/study/python-bots.md
T
2026-05-30 23:59:33 +00:00

56 lines
1.7 KiB
Markdown

# Python: Bots — Estudo
_Fonte: project-based-learning_
---
## 📚 Recursos
| Tutorial | Stack | Nível |
|----------|-------|-------|
| [Reddit Bot](http://pythonforengineers.com/build-a-reddit-bot-part-1/) | PRAW, Reddit API | Iniciante |
| [Facebook Messenger Bot](https://blog.hartleybrody.com/fb-messenger-bot/) | FB API, Flask | Intermediário |
| [Telegram Bot pt.1](https://khashtamov.com/en/how-to-create-a-telegram-bot-using-python/) | python-telegram-bot | Intermediário |
| [Telegram Bot pt.2](https://khashtamov.com/en/how-to-deploy-telegram-bot-django/) | Django + Telegram | Intermediário |
| [Twitter Bot](https://medium.freecodecamp.org/creating-a-twitter-bot-in-python-with-tweepy-ac524157a607) | Tweepy | Iniciante |
## 🎯 Aplicações para Mundo Telecom
1. **Telegram Bot** ✅ (já temos — OpenClaw via Telegram)
- Pipeline de voz funcionando (STT + TTS)
- Podemos expandir: notificações automáticas de editais
2. **Integração Twitter**: postar novos editais automaticamente
3. **Bot interno**: health check dos serviços, status da infra
## 📝 Notas de Estudo
### Arquitetura de Bots
- **Polling vs Webhook**: Polling simples, Webhook escalável
- **Filas**: Processamento assíncrono com Redis/RabbitMQ
- **Estado**: Sessions vs stateless (cada abordagem tem seu lugar)
### Telegram Bot Avançado
- Inline queries (pesquisar no meio da conversa)
- Custom keyboards
- Deep linking (botões com parâmetros)
- Webhooks com SSL (já temos setup via NPM!)
### Boas Práticas
- Rate limiting nativo da API
- Idempotência nas respostas
- Logging de todas as interações
- Graceful degradation
---
## ✅ Progresso
- [ ] Reddit Bot
- [ ] Facebook Messenger Bot
- [ ] Telegram Bot pt.1
- [ ] Telegram Bot pt.2
- [ ] Twitter Bot