databay.inlets.http_inlet¶
Warning
HttpInlet requires AIOHTTP to function. Please install required dependencies using:
pip install "databay[HttpInlet]"
-
class
databay.inlets.http_inlet.HttpInlet(url: str, json: str = True, cacert: Optional[str] = None, params: Optional[dict] = None, headers: Optional[LooseHeaders] = None, *args, **kwargs)[source]¶ databay.inlets.http_inlet.HttpInlet
Inlet for pulling data from a specified URL using aiohttp.
- Parameters
url (str) – URL that should be queried for data.
json (bool) – Whether response should be parsed as JSON.
Default:Truecacert (str) – Path to cacert TLS certificate bundle.
Default:Noneparams (dict) – Parameters for the request.
Default:Noneheaders (LooseHeaders) – Headers for the request.
Default:None
Bases:
databay.inlet.Inlet-
pull(self, update) → Union[List[Record], str][source]¶ async
Asynchronously pulls data from the specified URL using aiohttp.ClientSession.get