0% found this document useful (0 votes)
10 views

Assessment Task For Django Developer

A

Uploaded by

testpay6397
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Assessment Task For Django Developer

A

Uploaded by

testpay6397
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assessment Task for Django Developer

Weather Forecast App Tech Stack Required: Django 2 and Rest API

Data source: https://openweathermap.org/api/one-call-api (need to register, key will get


activated in about 1hr after registration)

Task Description:
We need to create an application to display the weather forecast for a selected set of
coordinates with selected type of detailing data. User will require to enter lat and lon in
the inputs and chose detailing type according to API
● Current weather Minute forecast for 1 hour
● Hourly forecast for 48 hours
● Daily forecast for 7 days

Plus points for: Allow the user to input the location via a Google map plugin.

By default local DB is empty and we should fill it with data from users’ requests. We need
to create API endpoint which will receive
● Lat
● Lon
● detailing type

We will first try to find weather forecast in the local DB, if the required data is not present
then we will request it from openweathermap and save to our local DB. Also, the data
that we store in the local DB should be time sensitive, and it should be configurable from
Django settings (by default 10 minutes). This means if the required data was received
more than 10 minutes ago, we need to request the data again, and in case the new data
received is different from the one stored, we will update it in the local DB.

For example:
1. User requests information for “lat: 33.441792 lon: -94.037689 and detailing
type=Minute forecast” at 10:00 AM, as we don’t have this data in local DB, we will
request data from openweathermap and save to the local DB.
2. After 5 minutes, the user again makes the same request (at 10:05). Here we will
return data from the local DB, because the data is still relevant.
3. Then the user again makes the request after 20 minutes (at 10:25). Here we
should request data from openweathermap again because the data in the local
DB is no longer relevant.

Plus points for: Unit and Integration Tests

You might also like