class_docstr: Base class where the decorators and base function for the other
  classes of this python wrapper will inherit from.
docstr: Initialize the class
  
  Keyword Arguments:
      key:  Alpha Vantage api key
      retries:  Maximum amount of retries in case of faulty connection or
          server not able to answer the call.
      treat_info_as_error: Treat information from the api as errors
      output_format:  Either 'json', 'pandas' os 'csv'
      indexing_type: Either 'date' to use the default date string given
      by the alpha vantage api call or 'integer' if you just want an
      integer indexing on your dataframe. Only valid, when the
      output_format is 'pandas'
      proxy: Dictionary mapping protocol or protocol and hostname to
      the URL of the proxy.
      rapidapi: Boolean describing whether or not the API key is
      through the RapidAPI platform or not
docstr_tok: ["Initialize","the","class","Keyword","Arguments",":","key",":","Alpha","Vantage","api","key","retries",":","Maximum","amount","of","retries","in","case","of","faulty","connection","or","server","not","able","to","answer","the","call",".","treat_info_as_error",":","Treat","information","from","the","api","as","errors","output_format",":","Either","'json","'",",","'pandas","'","os","'csv'","indexing_type",":","Either","'date","'","to","use","the","default","date","string","given","by","the","alpha","vantage","api","call","or","'integer","'","if","you","just","want","an","integer","indexing","on","your","dataframe",".","Only","valid",",","when","the","output_format","is","'pandas'","proxy",":","Dictionary","mapping","protocol","or","protocol","and","hostname","to","the","URL","of","the","proxy",".","rapidapi",":","Boolean","describing","whether","or","not","the","API","key","is","through","the","RapidAPI","platform","or","not"]
code: def __init__(
      self,
      key=None,
      output_format="json",
      treat_info_as_error=True,
      indexing_type="date",
      proxy=None,
      rapidapi=False,
  ):
      """Initialize the class
  
      Keyword Arguments:
          key:  Alpha Vantage api key
          retries:  Maximum amount of retries in case of faulty connection or
              server not able to answer the call.
          treat_info_as_error: Treat information from the api as errors
          output_format:  Either 'json', 'pandas' os 'csv'
          indexing_type: Either 'date' to use the default date string given
          by the alpha vantage api call or 'integer' if you just want an
          integer indexing on your dataframe. Only valid, when the
          output_format is 'pandas'
          proxy: Dictionary mapping protocol or protocol and hostname to
          the URL of the proxy.
          rapidapi: Boolean describing whether or not the API key is
          through the RapidAPI platform or not
      """
      if key is None:
          key = os.getenv("ALPHAVANTAGE_API_KEY")
      if not key or not isinstance(key, str):
          raise ValueError(
              "The AlphaVantage API key must be provided "
              "either through the key parameter or "
              "through the environment variable "
              "ALPHAVANTAGE_API_KEY. Get a free key "
              "from the alphavantage website: "
              "https://www.alphavantage.co/support/#api-key"
          )
      self.headers = {}
      if rapidapi:
          self.headers = {
              "x-rapidapi-host": "alpha-vantage.p.rapidapi.com",
              "x-rapidapi-key": key,
          }
      self.rapidapi = rapidapi
      self.key = key
      self.output_format = output_format
      if self.output_format == "pandas" and not _PANDAS_FOUND:
          raise ValueError(
              "The pandas library was not found, therefore can "
              "not be used as an output format, please install "
              "manually"
          )
      self.treat_info_as_error = treat_info_as_error
      # Not all the calls accept a data type appended at the end, this
      # variable will be overridden by those functions not needing it.
      self._append_type = True
      self.indexing_type = indexing_type
      self.proxy = proxy or {}
  
file_path: alpha_vantage/alpha_vantage/alphavantage.py
imports: import requests
  import os
  from functools import wraps
  import inspect
  import sys
  import re
  import csv
label_desc: Use image node_id 1 to create a new AlphaVantage object from inherited base classes: object with example: obj = AlphaVantage(key, output_format, treat_info_as_error, indexing_type, proxy, rapidapi)