class_docstr: Wrapper for connection to interact with Redis in-memory data structure store.
  
  You can set your db in the extra field of your connection as ``{"db": 3}``.
  Also you can set ssl parameters as:
  ``{"ssl": true, "ssl_cert_reqs": "require", "ssl_cert_file": "/path/to/cert.pem", etc}``.
class_docstr_tok: ["Wrapper","for","connection","to","interact","with","Redis","in-memory","data","structure","store",".","You","can","set","your","db","in","the","extra","field","of","your","connection","as","``","{","``","db","''",":","3","}","``",".","Also","you","can","set","ssl","parameters","as",":","``","{","``","ssl","''",":","true",",","``","ssl_cert_reqs","''",":","``","require","''",",","``","ssl_cert_file","''",":","``","\/path\/to\/cert.pem","''",",","etc","}","``","."]
docstr: Returns a Redis connection.
docstr_tok: ["Returns","a","Redis","connection","."]
code: def get_conn(self):
      """Returns a Redis connection."""
      conn = self.get_connection(self.redis_conn_id)
      self.host = conn.host
      self.port = conn.port
      self.username = conn.login
      self.password = (
          None
          if str(conn.password).lower() in ["none", "false", ""]
          else conn.password
      )
      self.db = conn.extra_dejson.get("db")
  
      # check for ssl parameters in conn.extra
      ssl_arg_names = [
          "ssl",
          "ssl_cert_reqs",
          "ssl_ca_certs",
          "ssl_keyfile",
          "ssl_certfile",
          "ssl_check_hostname",
      ]
      ssl_args = {
          name: val
          for name, val in conn.extra_dejson.items()
          if name in ssl_arg_names
      }
  
      # This logic is for backward compatibility only
      if (
          "ssl_cert_file" in conn.extra_dejson
          and "ssl_certfile" not in conn.extra_dejson
      ):
          warnings.warn(
              "Extra parameter `ssl_cert_file` deprecated and will be removed "
              "in a future release. Please use `ssl_certfile` instead.",
              AirflowProviderDeprecationWarning,
              stacklevel=2,
          )
          ssl_args["ssl_certfile"] = conn.extra_dejson.get(
              "ssl_cert_file"
          )
  
      if not self.redis:
          self.log.debug(
              'Initializing redis object for conn_id "%s" on %s:%s:%s',
              self.redis_conn_id,
              self.host,
              self.port,
              self.db,
          )
          self.redis = Redis(
              host=self.host,
              port=self.port,
              username=self.username,
              password=self.password,
              db=self.db,
              **ssl_args,
          )
  
      return self.redis
  
file_path: airflow/airflow/providers/redis/hooks/redis.py
imports: from __future__ import annotations
  import warnings
  from typing import Any
  from redis import Redis
  from airflow.exceptions import AirflowProviderDeprecationWarning
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 2 for calling the RedisHook obj's underlying member method code with example usage: obj.get_conn() and returns: self