Giter VIP home page Giter VIP logo

slackbot-weather's Introduction

☀️ Slack Bot Weather

SlackBot to display weather everytime user asks the weather.

Installation

First you need a few things pre-installed:

  • Python (in this case we're using Python 3)
  • Visual Studio Code for Editor
  • pip for installing packages

If you manage to install all of the points above, proceed here:

pip install slackclient 
pip install python-dotenv
pip install flask
pip install slackeventsapi
pip install requests

Then download ngrok for rerouting our Flask Local Server to the Web Server: https://ngrok.com/

Make sure that you follow the tutorial / documentation on how to install Ngrok on respective OS that you have.

For the Weather API, we will use OpenWeatherMap API: https://home.openweathermap.org/

Sign up for an account (Free Plan) until you can get an API KEY.

Project Architecture

.
└── env.py                  # Please copy this to a file named .env
└── bot.py                 # Our main Bot Python file.
└── readme.md               # Yes, you are reading me now.

Guides (.env)

  1. SLACK_TOKEN

    Please refer to the slack_token that you get when signing up your app in (https://api.slack.com/)

  2. SLACK_SIGNING_SECRET

    Find the signing secret on your API Slack Dashboard > Basic Information > App Credentials.

  3. OPENWEATHERMAP_KEY

    Sign up to the OpenWeatherMap API by signing up on the link I gave on above. If you successfully registered then please find the key on your profile.

Inspired by: https://www.youtube.com/watch?v=KJ5bFv-IRFM (go Subscribe to Tech with Tim!)

slackbot-weather's People

Contributors

richardridwan20 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.