You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenFGA SDK doesn't seem to support async_req parameter #194
Unless I missed something, it seems the async_req parameter to send requests asynchronously cannot be set from the public APIs. options_to_kwargs doesn't support this parameter, so there's no way to set it without using internal APIs. Is this expected?
Thanks for the contribution! However, I don't think we should add async_req support to the SDK.
The async_req parameter is a legacy pattern from OpenAPI Generator that uses threading (ThreadPool) under the hood. The Python SDK already provides a dedicated async client built on asyncio/aiohttp, which is the modern and recommended way to handle async operations in Python.
For example, you can use the async client today:
async with OpenFgaClient(configuration) as fga_client:
# Single async call
response = await fga_client.check(request)
# Concurrent calls
results = await asyncio.gather(
fga_client.check(request_1),
fga_client.check(request_2),
fga_client.check(request_3),
)
This gives you everything async_req would, with better performance characteristics and no threading overhead.
If there's a specific use case that the async client doesn't cover, we'd love to hear about it — happy to discuss further.
Activity
Abishek-Newar commentedon Jan 23, 2026
Hi @dandua98-cohere , I'd like to work on this issue. Would a PR to expose
async_reqthroughoptions_to_kwargsbe welcome?emilic commentedon Mar 24, 2026
Thanks for the contribution! However, I don't think we should add async_req support to the SDK.
The async_req parameter is a legacy pattern from OpenAPI Generator that uses threading (ThreadPool) under the hood. The Python SDK already provides a dedicated async client built on asyncio/aiohttp, which is the modern and recommended way to handle async operations in Python.
For example, you can use the async client today:
This gives you everything async_req would, with better performance characteristics and no threading overhead.
If there's a specific use case that the async client doesn't cover, we'd love to hear about it — happy to discuss further.