Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather App

Description

This is a simple weather app that fetches current weather data from the OpenWeatherMap API and stores it in a PostgreSQL database. This project is intended for educational purposes.

Requirements

  • Python 3.x
  • SQLAlchemy
  • Requests
  • Pandas
  • Dotenv

Running Scripts

To run these scripts, you can create and activate the virtual environment and then install dependencies via requirement.txt file. for doing that open a terminal, change directory the the place you want clone the repository. do the following commands in your terminal:

  1. First create a virtual environment, here you can install and use virtualenv:

install virtualenv using pip:

pip install virtualenv

create your environment:

virtualenv weatherappenv

then activate your environment:

source ./weatherappenv/bin/activate
  1. You can then clone the repository using this command:
git clone https://github.com/Ehsan457/weather-app.git
  1. Install dependencies with this command:
pip install -r requirements.txt
  1. Finally, you can modify the config file according to your needs and run the scripts. For ease of use, simply run createDB.py followed by createTable.py, and then run main.py to store the data in your database.

Note: The OpenWeatherMap API key is not pushed to this repository. You can sign up on the OpenWeatherMap website to get your own API key for free.

You can also create DAG scripts, put them in the Airflow DAGs folder, and activate them in your Airflow webserver to automate the workflows. Alternatively, you can use Cron after running createDB.py and createTable.py once.

About

A simple weather app that fetches data from OpenWeatherMap.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages