graflo.hq.connection_provider¶
Runtime connection/config resolution for source connectors.
This module defines a connector-centric runtime indirection:
Bindings (contract) -> conn_proxy name -> GeneralizedConnConfig (runtime).
ConnectionProvider
¶
Bases: Protocol
Resolve runtime source connection/auth configuration.
New connector-centric resolution (preferred):
- :meth:get_generalized_conn_config takes a connector and returns the
generalized runtime config.
Legacy helpers (kept for backwards compatibility):
- :meth:get_postgres_config
- :meth:get_sparql_auth
Source code in graflo/hq/connection_provider.py
EmptyConnectionProvider
¶
No-op provider when no source credentials/config are configured.
Source code in graflo/hq/connection_provider.py
InMemoryConnectionProvider
¶
Bases: BaseModel
Simple in-memory provider for proxy-based generalized configs.
Supports two wiring modes:
- New: proxy_by_connector_hash + configs_by_proxy
- Legacy: per-resource maps (postgres_by_resource / sparql_by_resource)
Source code in graflo/hq/connection_provider.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | |
bind_from_bindings(*, bindings)
¶
Populate proxy_by_connector_hash from the contract bindings.
Source code in graflo/hq/connection_provider.py
bind_single_config_for_bindings(*, bindings, conn_proxy, config)
¶
Bind one generalized config to all connectors in bindings.
This is intended for the common case where a single source DB (or single generalized API endpoint) supplies all SQL/SPARQL connectors in the manifest.
Raises:
| Type | Description |
|---|---|
ValueError
|
if bindings use multiple different |
Source code in graflo/hq/connection_provider.py
register_s3_config(*, conn_proxy, config)
¶
Store S3 staging credentials/config under conn_proxy.
PostgresGeneralizedConnConfig
¶
Bases: BaseModel
Generalized runtime config variant for SQL/Postgres connections.
Source code in graflo/hq/connection_provider.py
S3GeneralizedConnConfig
¶
Bases: BaseModel
Runtime credentials and defaults for S3 staging (TigerGraph bulk ingest).
Source code in graflo/hq/connection_provider.py
SparqlAuth
¶
SparqlGeneralizedConnConfig
¶
Bases: BaseModel
Generalized runtime config variant for SPARQL endpoint connections.