feat: add streamed-list-objects endpoint#163
Merged
Conversation
Codecov ReportAttention: Patch coverage is
❌ Your project status has failed because the head coverage (69.56%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #163 +/- ##
==========================================
+ Coverage 69.49% 69.56% +0.07%
==========================================
Files 133 135 +2
Lines 10554 10839 +285
==========================================
+ Hits 7334 7540 +206
- Misses 3220 3299 +79 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4 tasks
5 tasks
590f561 to
cfed381
Compare
cfed381 to
9eeb5d0
Compare
jimmyjames
approved these changes
Jan 23, 2025
This was referenced Jan 23, 2025
Merged
1 task
This was referenced Jul 16, 2025
This was referenced Oct 25, 2025
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This introduces support for OpenFGA's
POST /stores/{store_id}/streamed-list-objectsendpoint.The pull request introduces:
streamed_list_objects()method to the SDK client, simplifying the handling of the streaming endpoint for developers.stream()method to the async/sync REST clients, which supports handling of streaming/chunked HTTP network requests.build_request()method to the async/sync REST clients to handle the request-building steps shared by therequest()andstream()methods.handle_response_exception()method to the async/sync REST clients to handle the HTTP response exception processing shared between therequest()andstream()methods._accumulate_json_lines()private method to the async/sync REST clients to help collect and reassemble partially delivered packets from streaming/chunked HTTP network requests. This method is used bystream().streamed_list_objects_responseandstream_result_of_streamed_list_objects_responsemodels./example/streamed-list-objectsexample app, demonstrating usage through both the asynchronous and synchronous clients.READMEto demonstrate usage.pytest-asynciodependency to simplify working with async method tests.test/rest_test.pyandtest/sync/rest_test.pytest suites to target all methods in the refactored classes. It includes tests for the new streaming APIs.It changes:
_streamingparameter on appropriate methods, which helps direct the flow ofrequest()method of the async/sync REST clients.And removes:
GET(),HEAD(),OPTIONS(),POST(),PUT(),PATCH(),andDELETE()helper methods from the async/sync REST clients, to streamline the class and reduce redundant code.Usage Example:
Using the async client:
You can also review the new
/example/streamed-list-objects/asynchronous.py(orsynchronous.py) app for a more detailed usage demo.References
This code is generated using the SDK Generator; the pull request, including these changes, can be reviewed at its repository here: openfga/sdk-generator#469
The relevant issue for tracking this feature can be found her: openfga/sdk-generator#76
Review Checklist
main