Note
Python version: 3.11
- Clone the repository:
git clone https://github.com/myavuzokumus/LightweightWeatherApp-Backend.git
- Get the dependencies
python -m pip install --upgrade pip
pip install -r requirements.txt
- Run server!
python manage.py runserver
Important
You need to create .env
file in root directory. And add that following things:
- GOOGLEAPI_KEY = ""
- WEATHERAPI_KEY = ""
- SECRET_KEY=""
- virtualenv - To run project safely in environment.
- DateTime - Parse for datetimes.
- Django - For backend framework
- djangorestframework - To create own API.
- whitenoise - For Static files in live
- visualcrossing - Weather Data
- [Google Maps AutoComplete Places] - City Data
This project is licensed under the MIT License.
Data refreshing every 15 minute when user try to send pull request.
GET
- ..api/weather-info > Will display you all weather info of cities in database
- ..api/weather-info?city=name > Will display the city you typed in the city section of the URL.
POST
- ..api/weather-info | City key > If city doesn't exists, then it will be create and return that data.
- ..api/places | City key > Returns the cities in the word you send via POST.