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
[Feature] Add raw request method to Python SDK for calling arbitrary API endpoints #243
Currently, the SDK provides typed methods for specific API endpoints (check, write, read, etc.). However, there is no way to call arbitrary OpenFGA API endpoints that may not yet have dedicated SDK methods. This creates a gap when:
New OpenFGA API endpoints are released but SDK updates have not been implemented yet
Experimental endpoints need to be tested
Developers need a temporary alternative while waiting for official SDK support
Without a raw request method, developers are forced to either wait for SDK updates, or fork and modify the SDK code themselves, or call the OpenFGA API directly without the SDK, losing the benefits of SDK authentication, configuration, and error handling patterns. This reduces developer agility and creates friction in adopting new OpenFGA features.
Describe the ideal solution
Add a raw request method to the SDKs that allows developers to make arbitrary HTTP requests to any OpenFGA API endpoint while still leveraging the SDK's authentication, configuration, and error handling patterns.
This would provide an escape hatch for developers while maintaining consistency with the SDK's configuration. The typed methods would remain the recommended approach for standard API calls, while the raw request method provides flexibility during early adoption of new features.
Add an SDK "raw_request" escape-hatch by implementing async and sync OpenFgaClient.raw_request methods (modified openfga_sdk/client/client.py and openfga_sdk/sync/client/client.py), plus accompanying tests (test/client/raw_request_test.py, test/sync/client/raw_request_test.py), documentation (docs/RawRequest.md, RAW_REQUEST_QUICK_REFERENCE.md, IMPLEMENTATION_SUMMARY.md, FEATURE_CHANGELOG.md), and runnable examples (example/raw-request/example.py, example/raw-request/README.md).
Add a new raw_request escape-hatch to both async and sync OpenFgaClient (implemented in openfga_sdk/client/client.py and openfga_sdk/sync/client/client.py), and include comprehensive support and delivery changes: add async and sync test suites (test/client/raw_request_test.py, test/sync/client/raw_request_test.py), full documentation and quick reference (docs/RawRequest.md, RAW_REQUEST_QUICK_REFERENCE.md), examples and README (example/raw-request/example.py, example/raw-request/README.md), and project metadata/changelog and implementation notes (FEATURE_CHANGELOG.md, IMPLEMENTATION_SUMMARY.md) so callers can invoke arbitrary OpenFGA endpoints while preserving SDK auth, retries, telemetry, and error handling.
@dyeam0 Hi! I’d like to work on this issue. Could you please confirm if it’s still open and if there are any specific guidelines or expectations before I get started?
@Abishek-Newar Let's see if @kcbiradar is still interested since he asked back in November. @kcbiradar Sorry we did not respond earlier. We had a few higher-priority items we were focused on during December. This issue is bumped back up in priority. Are you still ready to take this feature?
The guidelines are that we have a requirement to maintain consistency across all languages SDKs, as much as possible, with the exception of language-specific idiomatic code. Would you be able to review the existing Go implementation (PR openfga/go-sdk#258) or Abhishek's JS PR (openfga/js-sdk#298) under review, and look to maintain consistency with those SDKs.
Activity
coderabbitai commentedon Nov 4, 2025
A summary of the changes CodeRabbit can apply:
kcbiradar commentedon Nov 22, 2025
@dyeam0 Hi! I’d like to work on this issue. Could you please confirm if it’s still open and if there are any specific guidelines or expectations before I get started?
Abishek-Newar commentedon Jan 14, 2026
Hi @dyeam0 , Since I have alreay worked on the same thing for js-sdk, can i procees to do this for python-sdk as well
dyeam0 commentedon Jan 14, 2026
Hi @kcbiradar and @Abishek-Newar, thanks for the offers to contribute!
@Abishek-Newar Let's see if @kcbiradar is still interested since he asked back in November. @kcbiradar Sorry we did not respond earlier. We had a few higher-priority items we were focused on during December. This issue is bumped back up in priority. Are you still ready to take this feature?
The guidelines are that we have a requirement to maintain consistency across all languages SDKs, as much as possible, with the exception of language-specific idiomatic code. Would you be able to review the existing Go implementation (PR openfga/go-sdk#258) or Abhishek's JS PR (openfga/js-sdk#298) under review, and look to maintain consistency with those SDKs.
dyeam0 commentedon Jan 14, 2026
@Abishek-Newar Also there are still .NET and Java available, if you know those languages too. :)
kcbiradar commentedon Jan 14, 2026
@dyeam0 No problem, I'm happy to contribute.
dyeam0 commentedon Jan 15, 2026
Thanks @kcbiradar! I have assigned the GH issue to you.