Coder Social home page Coder Social logo

weather_forecast_bot's Introduction

Weather Forecast Bot

Описание:

Телеграм бот для получения уведомлений об изменениях в погоде через API Gismeteo. Прогноз погоды можно получить используя команды:

  • /current_weather - погода на текущий момент
  • /weather_today - погода на сегодня
  • /weather_tomorrow - погода на завтра

Технологии:

Python PythonAnywhere

Как запустить:

  1. Используя BotFather создать телеграм бот.
  2. Через интерфейс BotFather добавить следующие команды боту.
     /current_weather - погода на текущий момент
     /weather_today - погода на сегодня
     /weather_tomorrow - погода на завтра
    
  3. В корне проекта создать файл .env и заполните его по шаблону:
GISMETEO_TOKEN=<Ваш токен полученый у Gismeteo> 
TELEGRAM_TOKEN=<Token Вашего Телеграм бота> 
  1. В корне проекта создать виртуальное окружение.
  • Win:
    python -m venv venv
    
  • Linux/MacOs:
    python3 -m venv venv
    
  1. Активируйте виртуальное окружение.
  • Win:
    source venv/Scripts/activate
    
  • Linux/MacOs:
    source venv/bib/activate
    
  1. Установить зависимости.
pip install requirements.txt
  1. Запустите исполняемый файл.
python main.py
  1. Чтобы получить прогноз, откройте ТГ бот, через вложение отправьте текущие координаты используя встроенную функцию в Телеграмм.
  2. Выберите одну из команд для получения прогноза.

    Пример:

    команда: /current_weather
    ответ:
    Погода на 2023-10-11:
    11:00:00: Температура воздуха составит: 8.3° С.
    Влажность воздуха: 69%. Давление: 752 мм. рт. ст. 
    Ветер: Юго-западный, 3 м/с, Облачно.
    

Контакты:

Евгений Ерохин

weather_forecast_bot's People

Contributors

evgenii-erokhin avatar

Stargazers

Anna Dmitrievna avatar Young Developer avatar Evgeniy Kutyashov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.