MCPcopy Create free account
hub / github.com/TheSecuredAnalyst/security-suite / create_client

Function create_client

core/http_client.py:116–125  ·  view source on GitHub ↗

Create an HTTP client context manager.

(
    base_url: Optional[str] = None,
    **kwargs,
)

Source from the content-addressed store, hash-verified

114
115
116@asynccontextmanager
117async def create_client(
118 base_url: str | None = None,
119 **kwargs,
120) -> AsyncIterator[HTTPClient]:
121 """Create an HTTP client context manager."""
122 client = HTTPClient(base_url=base_url, **kwargs)
123 try:
124 yield client
125 finally:
126 await client.close()

Callers

nothing calls this directly

Calls 2

closeMethod · 0.95
HTTPClientClass · 0.85

Tested by

no test coverage detected