https://github.com/jsonfm/telegram-serverless-bot-firebase
💬🤖 A serverless python telegram bot with firebase functions.
https://github.com/jsonfm/telegram-serverless-bot-firebase
firebase firebase-functions python telegram
Last synced: 9 months ago
JSON representation
💬🤖 A serverless python telegram bot with firebase functions.
- Host: GitHub
- URL: https://github.com/jsonfm/telegram-serverless-bot-firebase
- Owner: jsonfm
- Created: 2023-08-13T17:52:54.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-15T22:33:20.000Z (almost 3 years ago)
- Last Synced: 2024-12-03T09:14:06.525Z (over 1 year ago)
- Topics: firebase, firebase-functions, python, telegram
- Language: Python
- Homepage:
- Size: 108 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

### 💬🤖 Telegram Bot
Serverless with Firebase functions.
### ⚙️ Technologies
- Python
- Firebase Functions
- pyTelegramBotAPI
### 📦 Installation
1. Clone the repository:
```
https://github.com/jsonfm/telegram-serverless-bot-firebase.git
```
2. Create a virtual environment:
```
python3 -m venv venv
```
3. Activate the virtual environment:
```
source venv/bin/activate
```
4. Install the dependencies:
```
pip install -r requirements.txt
```
You will probably need the firebase cli, you can install it by following the [documentation](https://firebase.google.com/docs/cli) or executing:
```
npm install -g firebase-tools
```
You will also need to add the environment variables, see the `.env.example` file:
```
# FIREBASE
FIREBASE_PROJECT_ID=""
FIREBASE_PRIVATE_KEY_ID=""
FIREBASE_PRIVATE_KEY='{"key": "Some RSA key"}'
FIREBASE_CLIENT_EMAIL=""
FIREBASE_CLIENT_ID=""
FIREBASE_AUTH_URI=""
FIREBASE_TOKEN_URI=""
FIREBASE_PROVIDER_X509_CERT_URL=""
FIREBASE_CLIENT_X509_CERT_URL=""
FIREBASE_UNIVERSE_DOMAIN=""
FIREBASE_STORAGE=""
FIREBASE_WEB_API_KEY=""
# Telegram
TELEGRAM_API_KEY=""
TELEBRAM_BOT_USERNAME=""
# Webhook
WEBHOOK_URL=""
```
### ⚡️ Development
For running a local server execute:
```
firebase emulators:start
```
### 🚀 Deployment
```
firebase deploy --only functions
```