MCPcopy
hub / github.com/learnhouse/learnhouse / _to_async_url

Function _to_async_url

apps/api/cli.py:33–38  ·  view source on GitHub ↗
(url: str)

Source from the content-addressed store, hash-verified

31
32
33def _to_async_url(url: str) -> str:
34 if "+asyncpg" in url:
35 return url
36 if url.startswith("postgresql://"):
37 return url.replace("postgresql://", "postgresql+asyncpg://", 1)
38 return url
39
40
41def _to_sync_url(url: str) -> str:

Callers 1

_install_asyncFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected