Skip to main content
AsyncFigranium mirrors Figranium exactly: the same constructor keyword arguments, the same resource attributes, and the same method names. The only difference is that every network call returns an awaitable coroutine, and stream methods return AsyncIterator instead of Iterator.

Constructor

The async client accepts the same options as the sync client. The http_client argument expects an httpx.AsyncClient instead of httpx.Client.
filename.py

Context manager

Use async with to ensure the client closes automatically:
filename.py
You can also close explicitly:
filename.py

Await every call

All resource methods are async. Await each one:
filename.py
Top-level shortcuts are also async:
filename.py

Async streams

Stream methods return AsyncIterator[StreamEvent]. Use async for:
filename.py
The same pattern works for client.browser.selector_stream():
filename.py
See Streaming for event shape, terminal timeouts, and cancellation.

Error handling

Async calls raise the same FigraniumError as the sync client:
filename.py
See Errors for the full error shape.

Client configuration

All available client options, including base_url and timeout.

Streaming

Consuming SSE events with sync and async iterators.

Tasks resource

Save, run, and manage tasks.