MCPcopy Index your code
hub / github.com/Rushifakami/csfloat_api / __init__

Method __init__

csfloat_client.py:38–49  ·  view source on GitHub ↗
(self, api_key: str, proxy: str = None)

Source from the content-addressed store, hash-verified

36 )
37
38 def __init__(self, api_key: str, proxy: str = None) -> None:
39 self.API_KEY = api_key
40 self.proxy = proxy
41 self._validate_proxy()
42 self._headers = {
43 'Authorization': self.API_KEY
44 }
45 self._connector = ProxyConnector.from_url(self.proxy, ttl_dns_cache=300) if self.proxy else aiohttp.TCPConnector(
46 resolver=aiohttp.resolver.AsyncResolver(),
47 limit_per_host=50
48 )
49 self._session = aiohttp.ClientSession(connector=self._connector, headers=self._headers)
50
51 async def __aenter__(self):
52 return self

Callers

nothing calls this directly

Calls 1

_validate_proxyMethod · 0.95

Tested by

no test coverage detected