class_docstr: The abstract base class that all Streamlit Connections must inherit from.
  
  This base class provides connection authors with a standardized way to hook into the
  ``st.connection()`` factory function: connection authors are required to provide an
  implementation for the abstract method ``_connect`` in their subclasses.
  
  Additionally, it also provides a few methods/properties designed to make
  implementation of connections more convenient. See the docstrings for each of the
  methods of this class for more information
  
  .. note::
      While providing an implementation of ``_connect`` is technically all that's
      required to define a valid connection, connections should also provide the user
      with context-specific ways of interacting with the underlying connection object.
      For example, the first-party SQLConnection provides a ``query()`` method for
      reads and a ``session`` property for more complex operations.
class_docstr_tok: ["The","abstract","base","class","that","all","Streamlit","Connections","must","inherit","from",".","This","base","class","provides","connection","authors","with","a","standardized","way","to","hook","into","the","``","st.connection","(",")","``","factory","function",":","connection","authors","are","required","to","provide","an","implementation","for","the","abstract","method","``","_connect","``","in","their","subclasses",".","Additionally",",","it","also","provides","a","few","methods\/properties","designed","to","make","implementation","of","connections","more","convenient",".","See","the","docstrings","for","each","of","the","methods","of","this","class","for","more","information","..","note",":",":","While","providing","an","implementation","of","``","_connect","``","is","technically","all","that's","required","to","define","a","valid","connection",",","connections","should","also","provide","the","user","with","context-specific","ways","of","interacting","with","the","underlying","connection","object",".","For","example",",","the","first-party","SQLConnection","provides","a","``","query","(",")","``","method","for","reads","and","a","``","session","``","property","for","more","complex","operations","."]
docstr: Create a BaseConnection.
  
  This constructor is called by the connection factory machinery when a user
  script calls ``st.connection()``.
  
  Subclasses of BaseConnection that want to overwrite this method should take care
  to also call the base class' implementation.
  
  Parameters
  ----------
  connection_name : str
      The name of this connection. This corresponds to the
      ``[connections.<connection_name>]`` config section in ``st.secrets``.
  kwargs : dict
      Any other kwargs to pass to this connection class' ``_connect`` method.
  
  Returns
  -------
  None
docstr_tok: ["Create","a","BaseConnection",".","This","constructor","is","called","by","the","connection","factory","machinery","when","a","user","script","calls","``","st.connection","(",")","``",".","Subclasses","of","BaseConnection","that","want","to","overwrite","this","method","should","take","care","to","also","call","the","base","class","'","implementation",".","Parameters","--","--","--","--","--","connection_name",":","str","The","name","of","this","connection",".","This","corresponds","to","the","``","[","connections.","<","connection_name",">","]","``","config","section","in","``","st.secrets","``",".","kwargs",":","dict","Any","other","kwargs","to","pass","to","this","connection","class","'","``","_connect","``","method",".","Returns","--","--","--","-","None"]
code: def __init__(self, connection_name: str, **kwargs) -> None:
      """Create a BaseConnection.
  
      This constructor is called by the connection factory machinery when a user
      script calls ``st.connection()``.
  
      Subclasses of BaseConnection that want to overwrite this method should take care
      to also call the base class' implementation.
  
      Parameters
      ----------
      connection_name : str
          The name of this connection. This corresponds to the
          ``[connections.<connection_name>]`` config section in ``st.secrets``.
      kwargs : dict
          Any other kwargs to pass to this connection class' ``_connect`` method.
  
      Returns
      -------
      None
      """
      self._connection_name = connection_name
      self._kwargs = kwargs
  
      self._config_section_hash = calc_md5(
          json.dumps(self._secrets.to_dict())
      )
      secrets_singleton.file_change_listener.connect(
          self._on_secrets_changed
      )
  
      self._raw_instance: Optional[RawConnectionT] = self._connect(
          **kwargs
      )
  
file_path: streamlit/lib/streamlit/connections/base_connection.py
imports: import json
  from abc import ABC, abstractmethod
  from typing import Any, Generic, Optional, TypeVar
  from streamlit.runtime.secrets import AttrDict, secrets_singleton
  from streamlit.util import calc_md5
label_desc: Use image node_id 1 to create a new BaseConnection object from inherited base classes: ABC, Generic with example: obj = BaseConnection(connection_name)