MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / parse_pg_uri

Function parse_pg_uri

methods/MIRIX/scripts/reset_database.py:71–79  ·  view source on GitHub ↗

Parse PostgreSQL URI and extract connection details.

(uri: str)

Source from the content-addressed store, hash-verified

69
70
71def parse_pg_uri(uri: str) -> Dict[str, str]:
72 """Parse PostgreSQL URI and extract connection details."""
73 parsed = urlparse(uri)
74 return {
75 "host": parsed.hostname or "localhost",
76 "port": str(parsed.port or 5432),
77 "user": parsed.username or "mirix",
78 "database": parsed.path.lstrip("/") or "mirix",
79 }
80
81
82def get_pg_connection_details() -> Dict[str, str]:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected