Skip to content

fix: OpenFGA SDK doesn't seem to support async_req parameter#253

Open
Abishek-Newar wants to merge 7 commits into
openfga:mainfrom
Abishek-Newar:main
Open

fix: OpenFGA SDK doesn't seem to support async_req parameter#253
Abishek-Newar wants to merge 7 commits into
openfga:mainfrom
Abishek-Newar:main

Conversation

@Abishek-Newar

@Abishek-Newar Abishek-Newar commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

Description

What problem is being solved?

The async_req parameter exists in the lower-level api_client.py to enable threading-based asynchronous requests using Python's ThreadPool. However, this parameter is not exposed through the public OpenFgaClient API because the options_to_kwargs function doesn't support it, making it inaccessible without using internal APIs.

How is it being solved?

Updated the options_to_kwargs function to pass through the async_req parameter from user options to the underlying API calls.

What changes are made to solve it?

  • Added async_req parameter support in openfga_sdk/sync/client/client.py (sync client)

After this change, users can use async_req like this:

result = client.list_stores(options={"async_req": True})

References

closes #194

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • New Features
    • Added support for asynchronous request handling in API client operations. Users can now pass async request preferences through configuration options to enable non-blocking API calls.

✏️ Tip: You can customize this high-level summary in your review settings.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenFGA SDK doesn't seem to support async_req parameter

5 participants