https://github.com/mkbeh/weatherbot
Weather telegram bot.
https://github.com/mkbeh/weatherbot
Last synced: over 1 year ago
JSON representation
Weather telegram bot.
- Host: GitHub
- URL: https://github.com/mkbeh/weatherbot
- Owner: mkbeh
- Created: 2020-07-21T14:59:52.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T11:14:51.000Z (over 3 years ago)
- Last Synced: 2025-01-29T19:48:42.774Z (over 1 year ago)
- Language: Python
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple asynchronous "Weather telegram bot"
**Supports actions:**
* User registration/login/logout
* Send mail for confirm user email address
* Get weather today (temperature, humidity)
* Weather notifications for users every day at 10:00 AM
**Used stack:**
* Starlette
* Tortoise ORM
* MySQL
* Docker-Compose
**Third-party:**
* openweathermap.org API
* ngrok
## Setup
> git clone https://github.com/mkbeh/weatherbot && cd weatherbot
Create and fill in .env* files.
> Create 2 files in the same directory: .env_app , .env_mysql
**.env_app**
```
TELEGRAM_API_TOKEN=
OPENWEATHER_API_TOKEN=
NGROK_URL=
SECRET_KEY=random:secret:key
PWD_SALT=activation
GMAIL_USER=
GMAIL_PWD=
MYSQL_URL=mysql://:@db:3306/weatherbot
```
**.env_mysql**
```
MYSQL_ROOT_PASSWORD=root
MYSQL_DATABASE=weatherbot
MYSQL_USER=punk
MYSQL_PASSWORD=punk
MYSQL_HOST=db
```
## How to run
```
ngrok http 5000
docker-compose up
```