This API is intended to help you fetch weather data from different data sources in an efficient and uniform way. By just supplying a list of locations and a time window you can get data for a specific source immediately. This project is licensed under the MPL-2.0 license.
The system can parse one or multiple get_weather() requests from one or multiple WeatherModels / WeatherSources as one or multiple request-queues. This depending on the estimated required processing bandwidth (memory, download-speeds, storage space available, etc.).
The system organizes the requests into a sequential list. To prevent flooding the processing order is primarily based on the request order, but the system will interlace other request sources every other request as follows:
Request-list A is split in three request-queues: A1, A2 and A3
A1 > A2 > A3
Request-list B of three request-queues is added to the list: B1, B2 and B3
'A1 > B1 > A2 > A3 > B2 > B3 #The interlace skips the A2-A3 sequence for B'
Request-list C, consisting of a single request-queue is added: C1
'A1 > B1 > A2 > C1 > A3 > B2 > B3'
Note: Had C consisted of two queues, this would have been: 'A1 > B1 > A2 > C1 > A3 > B2 > C2 > B3'In short: The system looks for two sequential items in the list from the same source. Every uneven match will be used to place a new item for the latest request.
The system has extended error handling for partial failures, issues with sequencing, unexpected issues with storage and invalid queue components.
All of the code has both proper sphinx-proof documentation and full unit test coverage.
The following features are included:
A1 > A2 > A3
Request-list B of three request-queues is added to the list: B1, B2 and B3 'A1 > B1 > A2 > A3 > B2 > B3 #The interlace skips the A2-A3 sequence for B' Request-list C, consisting of a single request-queue is added: C1 'A1 > B1 > A2 > C1 > A3 > B2 > B3' Note: Had C consisted of two queues, this would have been: 'A1 > B1 > A2 > C1 > A3 > B2 > C2 > B3' In short: The system looks for two sequential items in the list from the same source. Every uneven match will be used to place a new item for the latest request.