MCPcopy Create free account
hub / github.com/feast-dev/feast / _get_conn

Function _get_conn

sdk/python/feast/infra/utils/postgres/connection_utils.py:15–22  ·  view source on GitHub ↗

Get a psycopg `Connection`.

(config: PostgreSQLConfig)

Source from the content-addressed store, hash-verified

13
14
15def _get_conn(config: PostgreSQLConfig) -> Connection:
16 """Get a psycopg `Connection`."""
17 conn = psycopg.connect(
18 conninfo=_get_conninfo(config),
19 keepalives_idle=config.keepalives_idle,
20 **_get_conn_kwargs(config),
21 )
22 return conn
23
24
25async def _get_conn_async(config: PostgreSQLConfig) -> AsyncConnection:

Callers 14

_get_connMethod · 0.90
query_generatorMethod · 0.90
_to_arrow_internalMethod · 0.90
_upload_entity_dfFunction · 0.90
_mon_upsertFunction · 0.90
_mon_queryFunction · 0.90

Calls 3

_get_conninfoFunction · 0.85
_get_conn_kwargsFunction · 0.85
connectMethod · 0.80

Tested by

no test coverage detected