项目作者: shahan007

项目描述 :
Weather Website using API from OpenWeather
高级语言: CSS
项目地址: git://github.com/shahan007/weather-website.git
创建时间: 2021-07-16T10:53:27Z
项目社区:https://github.com/shahan007/weather-website

开源协议:GNU General Public License v3.0

下载


weather-website

A simple single page web application to display the current weather and 3 times +3hr weather forecast

Check out the website here: Weather Health


Built With

  • API from Open Weather
  • Python version 3.8.0
  • HTML/CSS/JS/JQuery

How to run ?

Clone the repo

  1. $ git clone https://github.com/shahan007/weather-website.git

Setting up the environment

  1. $ python -m venv venv
  2. $ source venv/Scripts/activate
  3. (venv) $ pip install -r requirements.txt

Setting up the environment variables

  1. (venv) $ export FLASK_DEBUG=1 #optional
  2. (venv) $ export FLASK_APP=run.py
  3. (venv) $ export API_KEY=<YOUR_API_KEY>
Generating Secret Key for session
  1. (venv) $ python -c 'import os; print(os.urandom(16))'
  2. b'\xba\xc9>\xfc}\xcf\x1b\xe5\xcc\xb8\x94L\x8e\x8c-C' #copy this secret key & set it as secret key
  3. (venv) $ export SECRET_KEY=\xba\xc9>\xfc}\xcf\x1b\xe5\xcc\xb8\x94L\x8e\x8c-C

Run the website

  1. (venv) $ flask run