Skip to content

Glossary: LLMs in Production

async with

Also written: __aenter__, __aexit__

A statement for resources that are acquired and released asynchronously. A class with `__aenter__` and `__aexit__` works with it, as RateLimiter and Gate do.

Where the book teaches it

Related terms

asyncio.SemaphoreRate limiter