INNER CODE UNIT · Python

r

trevorhobenshield/twitter-api-client · scripts/update.py:137

            r = await backoff(client.get, sem, url, **kwargs)
            async for chunk in r.aiter_bytes(sz):
                await fp.write(chunk)
            return r

    _out = mkdir(out)
    return (partial(get, url=u) for u in urls)


def send(cfgs: list[dict], **kwargs) -> Generator:
    async def f(client: AsyncClient, sem: Semaphore, cfg: dict) -> Response:
        return await backoff(client.request, sem, **cfg, **kwargs)

    return (partial(f, cfg=cfg) for cfg in cfgs)


async def process(fns: Generator, max_connections: int = 2000, **kwargs):
    client_defaults = {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…