Used by Variable/Connection.

https://github.com/apache/airflow/blob/894741e311ffd642e036b80d3b1b5d53c3747cad/airflow/secrets/metastore.py#L32

#
#
#
"""Objects relating to sourcing connections from metastore database."""
from __future__ import annotations
import warnings
from typing import TYPE_CHECKING
from sqlalchemy import select
from airflow.exceptions import RemovedInAirflow3Warning
from airflow.secrets import BaseSecretsBackend
from airflow.utils.session import NEW_SESSION, provide_session
if TYPE_CHECKING:
    from sqlalchemy.orm import Session
    from airflow.models.connection import Connection
class MetastoreBackend(BaseSecretsBackend):
    """Retrieves Connection object and Variable from airflow metastore database."""
    @provide_session
    def get_connection(self, conn_id: str, session: Session = NEW_SESSION) -> Connection | None: