import operator
import urllib.parse
from typing import Any
from typing import Dict
from typing import Iterator
from typing import List
from typing import Optional
from typing import Tuple

from shillelagh.adapters.base import Adapter
from shillelagh.fields import Float
from shillelagh.fields import Integer
from shillelagh.fields import Order
from shillelagh.fields import String
from shillelagh.filters import Equal
from shillelagh.filters import Filter
from shillelagh.filters import Range
from shillelagh.types import RequestedOrder
from shillelagh.types import Row


class FakeEntryPoint:
    def __init__(self, name: str, adapter: Adapter):
        self.name = name
        self.adapter = adapter

    def load(self) -> Adapter:
        return self.adapter


class FakeAdapter(Adapter):

    safe = False

    age = Float(filters=[Range], order=Order.ANY, exact=True)
    name = String(filters=[Equal], order=Order.ANY, exact=True)
    pets = Integer(order=Order.ANY)

    @staticmethod
    def supports(uri: str) -> bool:
        parsed = urllib.parse.urlparse(uri)
        return parsed.scheme == "dummy"

    @staticmethod
    def parse_uri(uri: str) -> Tuple[()]:
        return ()

    def __init__(self):
        self.data = [
            {"rowid": 0, "name": "Alice", "age": 20, "pets": 0},
            {"rowid": 1, "name": "Bob", "age": 23, "pets": 3},
        ]

    def get_data(
        self,
        bounds: Dict[str, Filter],
        order: List[Tuple[str, RequestedOrder]],
    ) -> Iterator[Dict[str, Any]]:
        data = self.data[:]

        for column in ["name", "age"]:
            if column in bounds:
                data = [row for row in data if bounds[column].check(row[column])]

        for column_name, requested_order in order:
            reverse = requested_order == Order.DESCENDING
            data.sort(key=operator.itemgetter(column_name), reverse=reverse)

        yield from iter(data)

    def insert_row(self, row: Row) -> int:
        row_id: Optional[int] = row["rowid"]
        if row_id is None:
            row["rowid"] = row_id = max(row["rowid"] for row in self.data) + 1

        self.data.append(row)

        return row_id

    def delete_row(self, row_id: int) -> None:
        self.data = [row for row in self.data if row["rowid"] != row_id]


weatherapi_response = {
    "location": {
        "name": "Reykjavik",
        "region": "Gullbringusysla",
        "country": "Iceland",
        "lat": 64.15,
        "lon": -21.95,
        "tz_id": "Atlantic/Reykjavik",
        "localtime_epoch": 1616202420,
        "localtime": "2021-03-20 1:07",
    },
    "forecast": {
        "forecastday": [
            {
                "date": "2021-03-17",
                "date_epoch": 1615939200,
                "day": {
                    "maxtemp_c": 7.4,
                    "maxtemp_f": 45.3,
                    "mintemp_c": 5.5,
                    "mintemp_f": 41.9,
                    "avgtemp_c": 6.7,
                    "avgtemp_f": 44.1,
                    "maxwind_mph": 16.3,
                    "maxwind_kph": 26.3,
                    "totalprecip_mm": 2.3,
                    "totalprecip_in": 0.09,
                    "avgvis_km": 7.8,
                    "avgvis_miles": 4.0,
                    "avghumidity": 95.0,
                    "condition": {
                        "text": "Light rain",
                        "icon": "//cdn.weatherapi.com/weather/64x64/day/296.png",
                        "code": 1183,
                    },
                    "uv": 0.0,
                },
                "astro": {
                    "sunrise": "07:39 AM",
                    "sunset": "07:36 PM",
                    "moonrise": "08:37 AM",
                    "moonset": "No moonset",
                    "moon_phase": "Waxing Crescent",
                    "moon_illumination": "23",
                },
                "hour": [
                    {
                        "time_epoch": 1615939200,
                        "time": "2021-03-17 00:00",
                        "temp_c": 5.5,
                        "temp_f": 41.9,
                        "is_day": 0,
                        "condition": {
                            "text": "Overcast",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/122.png",
                            "code": 1009,
                        },
                        "wind_mph": 13.2,
                        "wind_kph": 21.2,
                        "wind_degree": 134,
                        "wind_dir": "SE",
                        "pressure_mb": 1021.0,
                        "pressure_in": 30.6,
                        "precip_mm": 0.0,
                        "precip_in": 0.0,
                        "humidity": 95,
                        "cloud": 100,
                        "feelslike_c": 1.6,
                        "feelslike_f": 34.9,
                        "windchill_c": 1.6,
                        "windchill_f": 34.9,
                        "heatindex_c": 5.5,
                        "heatindex_f": 41.9,
                        "dewpoint_c": 4.7,
                        "dewpoint_f": 40.5,
                        "will_it_rain": 0,
                        "chance_of_rain": "0",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 10.0,
                        "vis_miles": 6.0,
                        "gust_mph": 22.1,
                        "gust_kph": 35.6,
                    },
                    {
                        "time_epoch": 1615942800,
                        "time": "2021-03-17 01:00",
                        "temp_c": 5.5,
                        "temp_f": 41.9,
                        "is_day": 0,
                        "condition": {
                            "text": "Overcast",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/122.png",
                            "code": 1009,
                        },
                        "wind_mph": 12.8,
                        "wind_kph": 20.6,
                        "wind_degree": 133,
                        "wind_dir": "SE",
                        "pressure_mb": 1020.0,
                        "pressure_in": 30.6,
                        "precip_mm": 0.0,
                        "precip_in": 0.0,
                        "humidity": 95,
                        "cloud": 100,
                        "feelslike_c": 1.7,
                        "feelslike_f": 35.0,
                        "windchill_c": 1.7,
                        "windchill_f": 35.0,
                        "heatindex_c": 5.5,
                        "heatindex_f": 41.9,
                        "dewpoint_c": 4.8,
                        "dewpoint_f": 40.6,
                        "will_it_rain": 0,
                        "chance_of_rain": "3",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 9.7,
                        "vis_miles": 6.0,
                        "gust_mph": 22.1,
                        "gust_kph": 35.5,
                    },
                    {
                        "time_epoch": 1615946400,
                        "time": "2021-03-17 02:00",
                        "temp_c": 5.5,
                        "temp_f": 41.9,
                        "is_day": 0,
                        "condition": {
                            "text": "Light rain",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/296.png",
                            "code": 1183,
                        },
                        "wind_mph": 12.5,
                        "wind_kph": 20.0,
                        "wind_degree": 131,
                        "wind_dir": "SE",
                        "pressure_mb": 1020.0,
                        "pressure_in": 30.6,
                        "precip_mm": 0.27,
                        "precip_in": 0.01,
                        "humidity": 96,
                        "cloud": 100,
                        "feelslike_c": 1.7,
                        "feelslike_f": 35.1,
                        "windchill_c": 1.7,
                        "windchill_f": 35.1,
                        "heatindex_c": 5.5,
                        "heatindex_f": 41.9,
                        "dewpoint_c": 4.8,
                        "dewpoint_f": 40.7,
                        "will_it_rain": 0,
                        "chance_of_rain": "61",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 9.3,
                        "vis_miles": 5.0,
                        "gust_mph": 22.0,
                        "gust_kph": 35.4,
                    },
                    {
                        "time_epoch": 1615950000,
                        "time": "2021-03-17 03:00",
                        "temp_c": 5.5,
                        "temp_f": 41.9,
                        "is_day": 0,
                        "condition": {
                            "text": "Light rain",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/296.png",
                            "code": 1183,
                        },
                        "wind_mph": 12.1,
                        "wind_kph": 19.4,
                        "wind_degree": 130,
                        "wind_dir": "SE",
                        "pressure_mb": 1020.0,
                        "pressure_in": 30.6,
                        "precip_mm": 0.36,
                        "precip_in": 0.01,
                        "humidity": 96,
                        "cloud": 100,
                        "feelslike_c": 1.8,
                        "feelslike_f": 35.2,
                        "windchill_c": 1.8,
                        "windchill_f": 35.2,
                        "heatindex_c": 5.5,
                        "heatindex_f": 41.9,
                        "dewpoint_c": 4.9,
                        "dewpoint_f": 40.8,
                        "will_it_rain": 0,
                        "chance_of_rain": "0",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 9.0,
                        "vis_miles": 5.0,
                        "gust_mph": 21.9,
                        "gust_kph": 35.3,
                    },
                    {
                        "time_epoch": 1615953600,
                        "time": "2021-03-17 04:00",
                        "temp_c": 5.6,
                        "temp_f": 42.1,
                        "is_day": 0,
                        "condition": {
                            "text": "Light rain",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/296.png",
                            "code": 1183,
                        },
                        "wind_mph": 11.7,
                        "wind_kph": 18.8,
                        "wind_degree": 133,
                        "wind_dir": "SE",
                        "pressure_mb": 1020.0,
                        "pressure_in": 30.6,
                        "precip_mm": 0.18,
                        "precip_in": 0.01,
                        "humidity": 96,
                        "cloud": 100,
                        "feelslike_c": 2.0,
                        "feelslike_f": 35.6,
                        "windchill_c": 2.0,
                        "windchill_f": 35.6,
                        "heatindex_c": 5.6,
                        "heatindex_f": 42.1,
                        "dewpoint_c": 5.0,
                        "dewpoint_f": 41.0,
                        "will_it_rain": 0,
                        "chance_of_rain": "61",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 9.0,
                        "vis_miles": 5.0,
                        "gust_mph": 21.6,
                        "gust_kph": 34.8,
                    },
                    {
                        "time_epoch": 1615957200,
                        "time": "2021-03-17 05:00",
                        "temp_c": 5.7,
                        "temp_f": 42.3,
                        "is_day": 0,
                        "condition": {
                            "text": "Light rain",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/296.png",
                            "code": 1183,
                        },
                        "wind_mph": 11.3,
                        "wind_kph": 18.2,
                        "wind_degree": 135,
                        "wind_dir": "SE",
                        "pressure_mb": 1020.0,
                        "pressure_in": 30.6,
                        "precip_mm": 0.27,
                        "precip_in": 0.01,
                        "humidity": 96,
                        "cloud": 100,
                        "feelslike_c": 2.2,
                        "feelslike_f": 36.0,
                        "windchill_c": 2.2,
                        "windchill_f": 36.0,
                        "heatindex_c": 5.7,
                        "heatindex_f": 42.3,
                        "dewpoint_c": 5.1,
                        "dewpoint_f": 41.2,
                        "will_it_rain": 0,
                        "chance_of_rain": "61",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 9.0,
                        "vis_miles": 5.0,
                        "gust_mph": 21.3,
                        "gust_kph": 34.3,
                    },
                    {
                        "time_epoch": 1615960800,
                        "time": "2021-03-17 06:00",
                        "temp_c": 5.8,
                        "temp_f": 42.4,
                        "is_day": 0,
                        "condition": {
                            "text": "Light rain",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/296.png",
                            "code": 1183,
                        },
                        "wind_mph": 11.0,
                        "wind_kph": 17.6,
                        "wind_degree": 138,
                        "wind_dir": "SE",
                        "pressure_mb": 1020.0,
                        "pressure_in": 30.6,
                        "precip_mm": 0.36,
                        "precip_in": 0.01,
                        "humidity": 96,
                        "cloud": 100,
                        "feelslike_c": 2.4,
                        "feelslike_f": 36.3,
                        "windchill_c": 2.4,
                        "windchill_f": 36.3,
                        "heatindex_c": 5.8,
                        "heatindex_f": 42.4,
                        "dewpoint_c": 5.2,
                        "dewpoint_f": 41.4,
                        "will_it_rain": 0,
                        "chance_of_rain": "0",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 9.0,
                        "vis_miles": 5.0,
                        "gust_mph": 21.0,
                        "gust_kph": 33.8,
                    },
                    {
                        "time_epoch": 1615964400,
                        "time": "2021-03-17 07:00",
                        "temp_c": 6.0,
                        "temp_f": 42.9,
                        "is_day": 0,
                        "condition": {
                            "text": "Light rain",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/296.png",
                            "code": 1183,
                        },
                        "wind_mph": 11.3,
                        "wind_kph": 18.1,
                        "wind_degree": 146,
                        "wind_dir": "SSE",
                        "pressure_mb": 1021.0,
                        "pressure_in": 30.6,
                        "precip_mm": 0.18,
                        "precip_in": 0.01,
                        "humidity": 96,
                        "cloud": 100,
                        "feelslike_c": 2.6,
                        "feelslike_f": 36.7,
                        "windchill_c": 2.6,
                        "windchill_f": 36.7,
                        "heatindex_c": 6.0,
                        "heatindex_f": 42.9,
                        "dewpoint_c": 5.4,
                        "dewpoint_f": 41.8,
                        "will_it_rain": 0,
                        "chance_of_rain": "61",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 6.7,
                        "vis_miles": 4.0,
                        "gust_mph": 21.5,
                        "gust_kph": 34.6,
                    },
                    {
                        "time_epoch": 1615968000,
                        "time": "2021-03-17 08:00",
                        "temp_c": 6.3,
                        "temp_f": 43.3,
                        "is_day": 1,
                        "condition": {
                            "text": "Light drizzle",
                            "icon": "//cdn.weatherapi.com/weather/64x64/day/266.png",
                            "code": 1153,
                        },
                        "wind_mph": 11.6,
                        "wind_kph": 18.6,
                        "wind_degree": 154,
                        "wind_dir": "SSE",
                        "pressure_mb": 1021.0,
                        "pressure_in": 30.6,
                        "precip_mm": 0.1,
                        "precip_in": 0.0,
                        "humidity": 96,
                        "cloud": 100,
                        "feelslike_c": 2.9,
                        "feelslike_f": 37.2,
                        "windchill_c": 2.9,
                        "windchill_f": 37.2,
                        "heatindex_c": 6.3,
                        "heatindex_f": 43.3,
                        "dewpoint_c": 5.7,
                        "dewpoint_f": 42.2,
                        "will_it_rain": 0,
                        "chance_of_rain": "51",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 4.3,
                        "vis_miles": 2.0,
                        "gust_mph": 21.9,
                        "gust_kph": 35.3,
                    },
                    {
                        "time_epoch": 1615971600,
                        "time": "2021-03-17 09:00",
                        "temp_c": 6.5,
                        "temp_f": 43.7,
                        "is_day": 1,
                        "condition": {
                            "text": "Light drizzle",
                            "icon": "//cdn.weatherapi.com/weather/64x64/day/266.png",
                            "code": 1153,
                        },
                        "wind_mph": 11.9,
                        "wind_kph": 19.1,
                        "wind_degree": 162,
                        "wind_dir": "SSE",
                        "pressure_mb": 1022.0,
                        "pressure_in": 30.7,
                        "precip_mm": 0.13,
                        "precip_in": 0.01,
                        "humidity": 96,
                        "cloud": 100,
                        "feelslike_c": 3.1,
                        "feelslike_f": 37.6,
                        "windchill_c": 3.1,
                        "windchill_f": 37.6,
                        "heatindex_c": 6.5,
                        "heatindex_f": 43.7,
                        "dewpoint_c": 5.9,
                        "dewpoint_f": 42.6,
                        "will_it_rain": 0,
                        "chance_of_rain": "0",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 2.0,
                        "vis_miles": 1.0,
                        "gust_mph": 22.4,
                        "gust_kph": 36.0,
                    },
                    {
                        "time_epoch": 1615975200,
                        "time": "2021-03-17 10:00",
                        "temp_c": 6.6,
                        "temp_f": 43.8,
                        "is_day": 1,
                        "condition": {
                            "text": "Light drizzle",
                            "icon": "//cdn.weatherapi.com/weather/64x64/day/266.png",
                            "code": 1153,
                        },
                        "wind_mph": 11.9,
                        "wind_kph": 19.2,
                        "wind_degree": 154,
                        "wind_dir": "SSE",
                        "pressure_mb": 1022.0,
                        "pressure_in": 30.7,
                        "precip_mm": 0.07,
                        "precip_in": 0.0,
                        "humidity": 96,
                        "cloud": 97,
                        "feelslike_c": 3.2,
                        "feelslike_f": 37.7,
                        "windchill_c": 3.2,
                        "windchill_f": 37.7,
                        "heatindex_c": 6.6,
                        "heatindex_f": 43.8,
                        "dewpoint_c": 6.0,
                        "dewpoint_f": 42.7,
                        "will_it_rain": 0,
                        "chance_of_rain": "51",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 2.0,
                        "vis_miles": 1.0,
                        "gust_mph": 22.1,
                        "gust_kph": 35.5,
                    },
                    {
                        "time_epoch": 1615978800,
                        "time": "2021-03-17 11:00",
                        "temp_c": 6.6,
                        "temp_f": 43.9,
                        "is_day": 1,
                        "condition": {
                            "text": "Light drizzle",
                            "icon": "//cdn.weatherapi.com/weather/64x64/day/266.png",
                            "code": 1153,
                        },
                        "wind_mph": 12.0,
                        "wind_kph": 19.3,
                        "wind_degree": 146,
                        "wind_dir": "SSE",
                        "pressure_mb": 1023.0,
                        "pressure_in": 30.7,
                        "precip_mm": 0.1,
                        "precip_in": 0.0,
                        "humidity": 96,
                        "cloud": 93,
                        "feelslike_c": 3.2,
                        "feelslike_f": 37.8,
                        "windchill_c": 3.2,
                        "windchill_f": 37.8,
                        "heatindex_c": 6.6,
                        "heatindex_f": 43.9,
                        "dewpoint_c": 6.0,
                        "dewpoint_f": 42.9,
                        "will_it_rain": 0,
                        "chance_of_rain": "51",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 2.0,
                        "vis_miles": 1.0,
                        "gust_mph": 21.8,
                        "gust_kph": 35.0,
                    },
                    {
                        "time_epoch": 1615982400,
                        "time": "2021-03-17 12:00",
                        "temp_c": 6.7,
                        "temp_f": 44.1,
                        "is_day": 1,
                        "condition": {
                            "text": "Light drizzle",
                            "icon": "//cdn.weatherapi.com/weather/64x64/day/266.png",
                            "code": 1153,
                        },
                        "wind_mph": 12.1,
                        "wind_kph": 19.4,
                        "wind_degree": 139,
                        "wind_dir": "SE",
                        "pressure_mb": 1023.0,
                        "pressure_in": 30.7,
                        "precip_mm": 0.13,
                        "precip_in": 0.01,
                        "humidity": 96,
                        "cloud": 90,
                        "feelslike_c": 3.3,
                        "feelslike_f": 37.9,
                        "windchill_c": 3.3,
                        "windchill_f": 37.9,
                        "heatindex_c": 6.7,
                        "heatindex_f": 44.1,
                        "dewpoint_c": 6.1,
                        "dewpoint_f": 43.0,
                        "will_it_rain": 0,
                        "chance_of_rain": "0",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 2.0,
                        "vis_miles": 1.0,
                        "gust_mph": 21.5,
                        "gust_kph": 34.6,
                    },
                    {
                        "time_epoch": 1615986000,
                        "time": "2021-03-17 13:00",
                        "temp_c": 6.9,
                        "temp_f": 44.5,
                        "is_day": 1,
                        "condition": {
                            "text": "Light drizzle",
                            "icon": "//cdn.weatherapi.com/weather/64x64/day/266.png",
                            "code": 1153,
                        },
                        "wind_mph": 12.9,
                        "wind_kph": 20.8,
                        "wind_degree": 137,
                        "wind_dir": "SE",
                        "pressure_mb": 1023.0,
                        "pressure_in": 30.7,
                        "precip_mm": 0.07,
                        "precip_in": 0.0,
                        "humidity": 95,
                        "cloud": 85,
                        "feelslike_c": 3.5,
                        "feelslike_f": 38.2,
                        "windchill_c": 3.5,
                        "windchill_f": 38.2,
                        "heatindex_c": 6.9,
                        "heatindex_f": 44.5,
                        "dewpoint_c": 6.2,
                        "dewpoint_f": 43.2,
                        "will_it_rain": 0,
                        "chance_of_rain": "51",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 4.7,
                        "vis_miles": 2.0,
                        "gust_mph": 22.8,
                        "gust_kph": 36.7,
                    },
                    {
                        "time_epoch": 1615989600,
                        "time": "2021-03-17 14:00",
                        "temp_c": 7.2,
                        "temp_f": 44.9,
                        "is_day": 1,
                        "condition": {
                            "text": "Cloudy",
                            "icon": "//cdn.weatherapi.com/weather/64x64/day/119.png",
                            "code": 1006,
                        },
                        "wind_mph": 13.7,
                        "wind_kph": 22.1,
                        "wind_degree": 136,
                        "wind_dir": "SE",
                        "pressure_mb": 1024.0,
                        "pressure_in": 30.7,
                        "precip_mm": 0.0,
                        "precip_in": 0.0,
                        "humidity": 94,
                        "cloud": 81,
                        "feelslike_c": 3.6,
                        "feelslike_f": 38.5,
                        "windchill_c": 3.6,
                        "windchill_f": 38.5,
                        "heatindex_c": 7.2,
                        "heatindex_f": 44.9,
                        "dewpoint_c": 6.3,
                        "dewpoint_f": 43.3,
                        "will_it_rain": 0,
                        "chance_of_rain": "2",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 7.3,
                        "vis_miles": 4.0,
                        "gust_mph": 24.2,
                        "gust_kph": 38.9,
                    },
                    {
                        "time_epoch": 1615993200,
                        "time": "2021-03-17 15:00",
                        "temp_c": 7.4,
                        "temp_f": 45.3,
                        "is_day": 1,
                        "condition": {
                            "text": "Cloudy",
                            "icon": "//cdn.weatherapi.com/weather/64x64/day/119.png",
                            "code": 1006,
                        },
                        "wind_mph": 14.5,
                        "wind_kph": 23.4,
                        "wind_degree": 135,
                        "wind_dir": "SE",
                        "pressure_mb": 1024.0,
                        "pressure_in": 30.7,
                        "precip_mm": 0.0,
                        "precip_in": 0.0,
                        "humidity": 93,
                        "cloud": 76,
                        "feelslike_c": 3.8,
                        "feelslike_f": 38.8,
                        "windchill_c": 3.8,
                        "windchill_f": 38.8,
                        "heatindex_c": 7.4,
                        "heatindex_f": 45.3,
                        "dewpoint_c": 6.4,
                        "dewpoint_f": 43.5,
                        "will_it_rain": 0,
                        "chance_of_rain": "0",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 10.0,
                        "vis_miles": 6.0,
                        "gust_mph": 25.5,
                        "gust_kph": 41.0,
                    },
                    {
                        "time_epoch": 1615996800,
                        "time": "2021-03-17 16:00",
                        "temp_c": 7.3,
                        "temp_f": 45.1,
                        "is_day": 1,
                        "condition": {
                            "text": "Cloudy",
                            "icon": "//cdn.weatherapi.com/weather/64x64/day/119.png",
                            "code": 1006,
                        },
                        "wind_mph": 15.1,
                        "wind_kph": 24.4,
                        "wind_degree": 136,
                        "wind_dir": "SE",
                        "pressure_mb": 1024.0,
                        "pressure_in": 30.7,
                        "precip_mm": 0.0,
                        "precip_in": 0.0,
                        "humidity": 93,
                        "cloud": 80,
                        "feelslike_c": 3.6,
                        "feelslike_f": 38.4,
                        "windchill_c": 3.6,
                        "windchill_f": 38.4,
                        "heatindex_c": 7.3,
                        "heatindex_f": 45.1,
                        "dewpoint_c": 6.2,
                        "dewpoint_f": 43.2,
                        "will_it_rain": 0,
                        "chance_of_rain": "2",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 10.0,
                        "vis_miles": 6.0,
                        "gust_mph": 26.5,
                        "gust_kph": 42.6,
                    },
                    {
                        "time_epoch": 1616000400,
                        "time": "2021-03-17 17:00",
                        "temp_c": 7.2,
                        "temp_f": 45.0,
                        "is_day": 1,
                        "condition": {
                            "text": "Patchy rain possible",
                            "icon": "//cdn.weatherapi.com/weather/64x64/day/176.png",
                            "code": 1063,
                        },
                        "wind_mph": 15.7,
                        "wind_kph": 25.3,
                        "wind_degree": 137,
                        "wind_dir": "SE",
                        "pressure_mb": 1024.0,
                        "pressure_in": 30.7,
                        "precip_mm": 0.03,
                        "precip_in": 0.0,
                        "humidity": 92,
                        "cloud": 84,
                        "feelslike_c": 3.3,
                        "feelslike_f": 38.0,
                        "windchill_c": 3.3,
                        "windchill_f": 38.0,
                        "heatindex_c": 7.2,
                        "heatindex_f": 45.0,
                        "dewpoint_c": 6.1,
                        "dewpoint_f": 42.9,
                        "will_it_rain": 0,
                        "chance_of_rain": "21",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 10.0,
                        "vis_miles": 6.0,
                        "gust_mph": 27.4,
                        "gust_kph": 44.2,
                    },
                    {
                        "time_epoch": 1616004000,
                        "time": "2021-03-17 18:00",
                        "temp_c": 7.1,
                        "temp_f": 44.8,
                        "is_day": 1,
                        "condition": {
                            "text": "Patchy rain possible",
                            "icon": "//cdn.weatherapi.com/weather/64x64/day/176.png",
                            "code": 1063,
                        },
                        "wind_mph": 16.3,
                        "wind_kph": 26.3,
                        "wind_degree": 138,
                        "wind_dir": "SE",
                        "pressure_mb": 1024.0,
                        "pressure_in": 30.7,
                        "precip_mm": 0.04,
                        "precip_in": 0.0,
                        "humidity": 92,
                        "cloud": 88,
                        "feelslike_c": 3.1,
                        "feelslike_f": 37.6,
                        "windchill_c": 3.1,
                        "windchill_f": 37.6,
                        "heatindex_c": 7.1,
                        "heatindex_f": 44.8,
                        "dewpoint_c": 5.9,
                        "dewpoint_f": 42.6,
                        "will_it_rain": 0,
                        "chance_of_rain": "0",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 10.0,
                        "vis_miles": 6.0,
                        "gust_mph": 28.4,
                        "gust_kph": 45.7,
                    },
                    {
                        "time_epoch": 1616007600,
                        "time": "2021-03-17 19:00",
                        "temp_c": 7.0,
                        "temp_f": 44.7,
                        "is_day": 1,
                        "condition": {
                            "text": "Patchy rain possible",
                            "icon": "//cdn.weatherapi.com/weather/64x64/day/176.png",
                            "code": 1063,
                        },
                        "wind_mph": 15.8,
                        "wind_kph": 25.4,
                        "wind_degree": 138,
                        "wind_dir": "SE",
                        "pressure_mb": 1024.0,
                        "pressure_in": 30.7,
                        "precip_mm": 0.02,
                        "precip_in": 0.0,
                        "humidity": 93,
                        "cloud": 90,
                        "feelslike_c": 3.1,
                        "feelslike_f": 37.6,
                        "windchill_c": 3.1,
                        "windchill_f": 37.6,
                        "heatindex_c": 7.0,
                        "heatindex_f": 44.7,
                        "dewpoint_c": 5.9,
                        "dewpoint_f": 42.6,
                        "will_it_rain": 0,
                        "chance_of_rain": "21",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 10.0,
                        "vis_miles": 6.0,
                        "gust_mph": 27.8,
                        "gust_kph": 44.8,
                    },
                    {
                        "time_epoch": 1616011200,
                        "time": "2021-03-17 20:00",
                        "temp_c": 7.0,
                        "temp_f": 44.5,
                        "is_day": 0,
                        "condition": {
                            "text": "Overcast",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/122.png",
                            "code": 1009,
                        },
                        "wind_mph": 15.3,
                        "wind_kph": 24.6,
                        "wind_degree": 138,
                        "wind_dir": "SE",
                        "pressure_mb": 1025.0,
                        "pressure_in": 30.7,
                        "precip_mm": 0.0,
                        "precip_in": 0.0,
                        "humidity": 93,
                        "cloud": 92,
                        "feelslike_c": 3.1,
                        "feelslike_f": 37.6,
                        "windchill_c": 3.1,
                        "windchill_f": 37.6,
                        "heatindex_c": 7.0,
                        "heatindex_f": 44.5,
                        "dewpoint_c": 5.9,
                        "dewpoint_f": 42.6,
                        "will_it_rain": 0,
                        "chance_of_rain": "3",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 10.0,
                        "vis_miles": 6.0,
                        "gust_mph": 27.2,
                        "gust_kph": 43.8,
                    },
                    {
                        "time_epoch": 1616014800,
                        "time": "2021-03-17 21:00",
                        "temp_c": 6.9,
                        "temp_f": 44.4,
                        "is_day": 0,
                        "condition": {
                            "text": "Overcast",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/122.png",
                            "code": 1009,
                        },
                        "wind_mph": 14.8,
                        "wind_kph": 23.8,
                        "wind_degree": 138,
                        "wind_dir": "SE",
                        "pressure_mb": 1025.0,
                        "pressure_in": 30.8,
                        "precip_mm": 0.0,
                        "precip_in": 0.0,
                        "humidity": 93,
                        "cloud": 94,
                        "feelslike_c": 3.1,
                        "feelslike_f": 37.6,
                        "windchill_c": 3.1,
                        "windchill_f": 37.6,
                        "heatindex_c": 6.9,
                        "heatindex_f": 44.4,
                        "dewpoint_c": 5.9,
                        "dewpoint_f": 42.6,
                        "will_it_rain": 0,
                        "chance_of_rain": "0",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 10.0,
                        "vis_miles": 6.0,
                        "gust_mph": 26.6,
                        "gust_kph": 42.8,
                    },
                    {
                        "time_epoch": 1616018400,
                        "time": "2021-03-17 22:00",
                        "temp_c": 6.8,
                        "temp_f": 44.3,
                        "is_day": 0,
                        "condition": {
                            "text": "Overcast",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/122.png",
                            "code": 1009,
                        },
                        "wind_mph": 14.5,
                        "wind_kph": 23.3,
                        "wind_degree": 140,
                        "wind_dir": "SE",
                        "pressure_mb": 1026.0,
                        "pressure_in": 30.8,
                        "precip_mm": 0.0,
                        "precip_in": 0.0,
                        "humidity": 93,
                        "cloud": 94,
                        "feelslike_c": 3.1,
                        "feelslike_f": 37.5,
                        "windchill_c": 3.1,
                        "windchill_f": 37.5,
                        "heatindex_c": 6.8,
                        "heatindex_f": 44.3,
                        "dewpoint_c": 5.8,
                        "dewpoint_f": 42.5,
                        "will_it_rain": 0,
                        "chance_of_rain": "3",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 10.0,
                        "vis_miles": 6.0,
                        "gust_mph": 26.1,
                        "gust_kph": 42.0,
                    },
                    {
                        "time_epoch": 1616022000,
                        "time": "2021-03-17 23:00",
                        "temp_c": 6.8,
                        "temp_f": 44.2,
                        "is_day": 0,
                        "condition": {
                            "text": "Overcast",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/122.png",
                            "code": 1009,
                        },
                        "wind_mph": 14.2,
                        "wind_kph": 22.8,
                        "wind_degree": 142,
                        "wind_dir": "SE",
                        "pressure_mb": 1026.0,
                        "pressure_in": 30.8,
                        "precip_mm": 0.0,
                        "precip_in": 0.0,
                        "humidity": 93,
                        "cloud": 94,
                        "feelslike_c": 3.0,
                        "feelslike_f": 37.5,
                        "windchill_c": 3.0,
                        "windchill_f": 37.5,
                        "heatindex_c": 6.8,
                        "heatindex_f": 44.2,
                        "dewpoint_c": 5.8,
                        "dewpoint_f": 42.4,
                        "will_it_rain": 0,
                        "chance_of_rain": "3",
                        "will_it_snow": 0,
                        "chance_of_snow": "0",
                        "vis_km": 10.0,
                        "vis_miles": 6.0,
                        "gust_mph": 25.6,
                        "gust_kph": 41.2,
                    },
                ],
            },
        ],
    },
}
