code: def __init__(self, name: str, **kwargs):
      super().__init__(name)
      self._tables = {}
  
      args = kwargs.get("connection_data", {})
      handler_config = Config().get("weather_handler", {})
  
      connection_args = {}
  
      for k in ["api_key"]:
          if k in args:
              connection_args[k] = args[k]
          elif f"WEATHER_{k.upper()}" in os.environ:
              connection_args[k] = os.environ[f"WEATHER_{k.upper()}"]
          elif k in handler_config:
              connection_args[k] = handler_config[k]
  
      self._api_key = connection_args["api_key"]
  
      # Register tables
      self._register_table(
          "hourly", PiratePirateWeatherAPIHourlyTable(self)
      )
      self._register_table(
          "daily", PiratePirateWeatherAPIDailyTable(self)
      )
  
imports: import os
  from collections import OrderedDict
  from typing import Any
  import pandas
  import requests
  from mindsdb_sql import parse_sql
  from mindsdb_sql.parser import ast
  from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
  from mindsdb.integrations.handlers.utilities.query_utilities import SELECTQueryParser, SELECTQueryExecutor
  from mindsdb.integrations.libs.api_handler import APIHandler, APITable
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
  from mindsdb.integrations.libs.response import HandlerResponse, HandlerStatusResponse
  from mindsdb.integrations.utilities.sql_utils import extract_comparison_conditions
  from mindsdb.utilities.config import Config
label_desc: Use image node_id 1 to create a new PirateWeatherAPIHandler object from inherited base classes: APIHandler with example: obj = PirateWeatherAPIHandler(name)