Skip to content

cropboard/weather-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cropboard weather service

This is a minimal weather microservice for cropboard.

Test it here

It serves little data like below

{
  "lat": 3.8667,
  "lon": 11.5167,
  "temp": "298.96 F",
  "pressure": "1017hPa",
  "humidity": "67%",
  "visibility": "10.0km",
  "windSpeed": "1.88m/s",
  "windDeg": 271,
  "timezone": 3600,
  "location": "Yaoundé",
  "country": "CM",
  "weather": "overcast clouds"
}

This information is used as the Weather scalar for cropData object.

Setting up

First clone this repository

git clone https://github.com/cropboard/weather-server

Then change directory into it

cd weather-server

Go to openweathermap and create an account along with an API key.

Create a .env file and add the following inside

OPENWEATHERMAP_API_KEY=<YOUR_API_KEY>

Install requirements by typing the following in your terminal

pip install -r requirements.txt

Now run with

uvicorn main:app --reload

Navigate to /<CITY-NAME> to view weather data for a city.

About

The weather forecast server for cropboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages