MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / _dot_postgresql_path

Function _dot_postgresql_path

asyncpg/connect_utils.py:273–279  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

271
272
273def _dot_postgresql_path(filename) -> typing.Optional[pathlib.Path]:
274 try:
275 homedir = pathlib.Path.home()
276 except (RuntimeError, KeyError):
277 return None
278
279 return (homedir / '.postgresql' / filename).resolve()
280
281
282def _parse_connect_dsn_and_args(*, dsn, host, port, user,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected