Releases: openfga/python-sdk
v0.9.9
0.9.9 (2025-12-09)
- feat: improve error messaging (#245)
What's Changed
- feat: improve error messaging by @SoulPancake in #245
- chore(deps): bump the dependencies group with 4 updates by @dependabot[bot] in #246
- release: v0.9.9 by @SoulPancake in #247
Full Changelog: v0.9.8...v0.9.9
v0.9.8
0.9.8 (2025-11-04)
- feat: add support for conflict options for Write operations: (#235)
The client now supports settingConflictOptionsonClientWriteOptionsto control behavior when writing duplicate tuples or deleting non-existent tuples. This feature requires OpenFGA server v1.10.0 or later.
See Conflict Options for Write Operations for more.on_duplicatefor handling duplicate tuple writes (ERROR or IGNORE)on_missingfor handling deletes of non-existent tuples (ERROR or IGNORE)
What's Changed
- chore: reduce generated code by @rhamzeh in #236
- chore: Added a top-level Makefile in python-sdk to simplify running tests and linters by @Abishek-Newar in #241
- feat: support write conflicts options by @SoulPancake in #237
- chore(deps): bump the dependencies group with 5 updates by @dependabot[bot] in #242
- release: v0.9.8 by @rhamzeh in #244
New Contributors
- @Abishek-Newar made their first contribution in #241
Full Changelog: v0.9.7...v0.9.8
v0.9.7
0.9.7 (2025-10-06)
Full Changelog: v0.9.6...v0.9.7
v0.9.6
0.9.6 (2025-09-15)
- fix: reuse ssl context in the sync client (#222) - thanks @wadells!
- feat: add OAuth2 scopes parameter support to CredentialConfiguration (#213) - thanks @SoulPancake
- chore: modernize packaging - thanks @abhiaagarwal
Full Changelog
- chore: update readme import error by @carlastabile in #202
- Update SECURITY-INSIGHTS by @aaguiarz in #203
- Potential fix for code scanning alert no. 1: Workflow does not contain permissions by @aaguiarz in #204
- Potential fix for code scanning alert no. 2: Workflow does not contain permissions by @aaguiarz in #205
- Potential fix for code scanning alert no. 3: Workflow does not contain permissions by @aaguiarz in #206
- chore(ci): remove semgrep workflow by @rhamzeh in #208
- Create scorecard.yml by @aaguiarz in #209
- ci: update dependabot config by @evansims in #211
- chore(deps): bump the dependencies group with 3 updates by @dependabot[bot] in #212
- chore(deps): update dependencies by @evansims in #210
- feat: add OAuth2 scopes parameter support to CredentialConfiguration by @SoulPancake in #213
- chore: sync sdk generator changes by @rhamzeh in #221
- fix: reuse ssl context in the sync client by @rhamzeh in #222
- chore: move to packaging with pyproject.toml by @rhamzeh in #220
- release: v0.9.6 by @rhamzeh in #223
- fix(ci): fix build with uv by @rhamzeh in #225
New Contributors
- @carlastabile made their first contribution in #202
- @SoulPancake made their first contribution in #213
Full Changelog: v0.9.5...v0.9.6
v0.9.5
0.9.5 (2025-07-09)
- fix: aiohttp.ClientResponse.data should be awaited (#197) - thanks @cmbernard333
v0.9.4
0.9.4 (2025-04-30)
- feat: support List Stores name filter (#181)
- feat: fix and improve retries and rate limit handling. (#176) - thanks @GMorris-professional
The SDK now respects the rate limit headers (Retry-After) returned by the server and will retry the request after the specified time.
If the header is not sent or on network errors, it will fall back to exponential backoff. - feat: allow more user customizations for the token issuer (#186) - thanks @manuel-lang
- fix: ListRelations should not swallow errors (#183)
- fix: urllib3 compatibility < v2 (#187)
v0.9.3
v0.9.2
v0.9.1
v0.9.0
0.9.0 (2024-12-19)
Added:
- feat: add support for
start_timeparameter inReadChangesendpoint (#156) - Note, this feature requires v1.8.0 of OpenFGA or newer - feat!: add support for
BatchCheckAPI (#154) - Note, this feature requires v1.8.2 of OpenFGA or newer
Changed:
- feat: remove client-side validation - thanks @GMorris-professional (#155)
- fix: change default max retry limit to 3 from 15 - thanks @ovindu-a (#155)
Warning
Usage of the existing batch_check should now use client_batch_check instead, additionally the existing
BatchCheckResponse has been renamed to ClientBatchCheckClientResponse.
Please see below for how to migrate your code, and #154 for more details on this change.
Migration
"I want to continue using client side batch check"
Given that this necessitates an upgrade of OpenFGA, it might not be feasible for everyone to switch to the new server based method, if you wish to delay the migration, rename the existing usage to the new method name as shown below.
- client.batch_check()
+ client.client_batch_check()"I want to migrate to the new server based batch check"
If you wish to migrate to the new method, whilst the method name remains the same. You will need to alter the way you construct the checks passed.
- Previously a list of
ClientCheckRequestwas constructed and passed directly tobatch_check, now you should construct a list ofClientBatchCheckItemand pass aClientBatchCheckRequesttobatch_checkwith that list as thechecksproperty- The
correlation_idon aClientBatchCheckItemis set for you if you do not provide it.
- The
- The
resultnow contains acorrelation_idproperty in addition to theerrorandrequesttypes and has removed theresponseproperty. Additionally, theerrorproperty is now of aCheckErrortype, rather than anExceptiontype.
checks = [
- ClientCheckRequest(
+ ClientBatchCheckItem(
user="user:1",
relation="owner",
object="document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
contextual_tuples=[
ClientTuple(
user="user:1",
relation="owner",
object="document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
)
]
),
- ClientCheckRequest(
+ ClientBatchCheckItem(
user="use:2",
relation="owner",
object="document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a"
)
]
- result = fga_client.client_batch_check(checks)
+ result = fga_client.batch_check(ClientBatchCheckRequest(checks=checks))
# response.result = [{
# allowed: true,
# correlation_id: "de3630c2-f9be-4ee5-9441-cb1fbd82ce75", # generated by the SDK
# tuple: {
# user: "user:1",
# relation: "viewer",
# object: "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a",
# contextual_tuples: [{
# user: "user:1",
# relation: "editor",
# object: "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a"
# }]
# }
# }, {
# allowed: false,
# correlation_id: "6d7c7129-9607-480e-bfd0-17c16e46b9ec",
# tuple: {
# user="user:2",
# relation="own",
# object="document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a"
# },
# error: {
# input_error: "validation_error",
# message: "type 'doc' not found"
# }
# }]