NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #3066 most downloaded on PyPI
A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar.
Latest stable
0.10.5
Last release 1 months ago
29 Sep 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 38 of 38 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
38 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
apply per-request min_wait_in_ms to wait, not max_retry (#320) (c190a4f), closes #319
Full Changelog: https://github.com/openfga/python-sdk/compare/v0.10.4...v0.10.5
Your coding agent can read these notes before it upgrades. Set up the MCP server →
add support for Python 3.13 and 3.14
Full Changelog: https://github.com/openfga/python-sdk/compare/v0.10.3...v0.10.4
add token expiry buffer to prevent expired token usage and lock concurrent refreshes
Full Changelog: https://github.com/openfga/python-sdk/compare/v0.10.2...v0.10.3
oauth2 scopes for authentication
Full Changelog: https://github.com/openfga/python-sdk/compare/v0.10.1...v0.10.2
stop destroying connection pool after every sync request
Full Changelog: https://github.com/openfga/python-sdk/compare/v0.10.0...v0.10.1
feat: add execute_api_request and execute_streamed_api_request methods to OpenFgaClient and OpenFgaApi for making arbitrary HTTP requests to any OpenF
execute_api_request and execute_streamed_api_request methods to OpenFgaClient and OpenFgaApi for making arbitrary HTTP requests to any OpenFGA API endpoint with full auth, retry, and telemetry support (#252) - thanks @kcbiradar_return_http_data_only, _preload_content, _request_auth, async_req, and _request_timeout kwargs have been removed from all OpenFgaApi and SyncOpenFgaApi endpoint methods. These were internal implementation details not intended for external use. _return_http_data_only is now hardcoded to True; all endpoint methods return the deserialized response object directly. Users relying on _with_http_info methods returning a (data, status, headers) tuple should use execute_api_request instead.Full Changelog: https://github.com/openfga/python-sdk/compare/v0.9.9...v0.10.0
feat: improve error messaging by @SoulPancake in https://github.com/openfga/python-sdk/pull/245
Full Changelog: https://github.com/openfga/python-sdk/compare/v0.9.8...v0.9.9
feat: add support for conflict options for Write operations: (#235) The client now supports setting ConflictOptions on ClientWriteOptions to control b
ConflictOptions on ClientWriteOptions to 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_duplicate for handling duplicate tuple writes (ERROR or IGNORE)on_missing for handling deletes of non-existent tuples (ERROR or IGNORE)Full Changelog: https://github.com/openfga/python-sdk/compare/v0.9.7...v0.9.8
feat: headers configuration property
headers configuration property (https://github.com/openfga/python-sdk/pull/233)Full Changelog: https://github.com/openfga/python-sdk/compare/v0.9.6...v0.9.7
headers configuration property (#233)fix: reuse ssl context in the sync client (#222) - thanks @wadells!
Full Changelog: https://github.com/openfga/python-sdk/compare/v0.9.5...v0.9.6
fix: aiohttp.ClientResponse.data should be awaited (#197) - thanks @cmbernard333
feat: support List Stores name filter
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.fix: urllib3 compatibility < v2
Resolve some bugs with telemetry attributes and metrics tracking #177
Fixed:
stream request is made #172stream request (#172)feat: add /streamed-list-objects endpoint support (\#163)
Added:
/streamed-list-objects endpoint support (#163)contextual_tuples support for /expand endpoint requests (#164)/streamed-list-objects endpoint support (#163)contextual_tuples support for /expand endpoint requests (#164)feat: add support for start_time parameter in ReadChanges endpoint (#156) - Note, this feature requires v1.8.0 of OpenFGA or newer
Added:
start_time parameter in ReadChanges endpoint (#156) - Note, this feature requires v1.8.0 of OpenFGA or newerBatchCheck API (#154) - Note, this feature requires v1.8.2 of OpenFGA or newerChanged:
[!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.
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()
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.
ClientCheckRequest was constructed and passed directly to batch_check, now you should construct a list of ClientBatchCheckItem and pass a ClientBatchCheckRequest to batch_check with that list as the checks property
correlation_id on a ClientBatchCheckItem is set for you if you do not provide it.result now contains a correlation_id property in addition to the error and request types and has removed the response property. Additionally, the error property is now of a CheckError type, rather than an Exception type.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"
# }
# }]
start_time parameter in ReadChanges endpoint (#156) - Note, this feature requires v1.8.0 of OpenFGA or newerBatchCheck API (#154) - Note, this feature requires v1.8.0 of OpenFGA or newerBREAKING CHANGE:
Usage of the existing batch_check should now use client_batch_check instead, additionally the existing BatchCheckResponse has been renamed to ClientBatchCheckClientResponse.
Please see (#154)(https://github.com/openfga/python-sdk/pull/154) for more details on this change.
feat: allow specifying a request timeout (\#151) - thanks @Oscmage
Note: The only breaking change to be aware of with this release is a change in the naming scheme used for the OpenTelemetry meter.
Added:
Changed:
Fixed:
retry_params (#144)read_latest_authorization_model (#147)Note: The only breaking change to be aware of with this release is a change in the naming scheme used for the OpenTelemetry meter.
retry_params (#144)read_latest_authorization_model (#147)This release includes improvements to the OpenTelemetry configuration API introduced in the previous releases
This release includes improvements to the OpenTelemetry configuration API introduced in the previous releases
This release also includes fixes for several bugs identified in previous releases:
This release includes fixes for several bugs identified in the previous release related to OpenTelemetry metrics reporting:
This release includes fixes for several bugs identified in the previous release related to OpenTelemetry metrics reporting: (#124)
http_client_request_duration being reported in seconds rather than the intended millisecondsqueryDuration() and requestDuration()queryDuration() and requestDuration() may not have updated their histograms reliably when attr_http_client_request_duration or attr_http_server_request_duration (respectively) were not enabled (which is the default)Please note that if you use third-party OpenTelemetry tooling to visualize the attributes mentioned above, you may need to update your queries to account for these changes.
Note this introduces some breaking changes to our metrics:
Note this introduces some breaking changes to our metrics:
fga-client.request.method is now in TitleCase to match the naming conventions in the Protos, e.g., Check, ListObjects, etc.fga-client.userhttp.client.request.durationhttp.server.request.duration
We added configuration options to allow you to set which specific metrics and attributes you care about in case the defaults don't work for your use case.feat: add support for specifying consistency when evaluating or reading (#113) Note: To use this feature, you need to be running OpenFGA v1.5.7+ with
enable-consistency-params enabled.
See the OpenFGA v1.5.7 release notes for details.feat: add support for specifying consistency when evaluating or reading (#129)
Note: To use this feature, you need to be running OpenFGA v1.5.7+ with the experimental flag
enable-consistency-params enabled. See the v1.5.7 release notes for details.
feat: add OpenTelemetry metrics reporting
feat: add OpenTelemetry metrics reporting
fix: ClientTuple condition property type
### 0.4.3 (2024-06-07) - feat: support for list users
feat: support for modular models metadata
api_scheme, min_wait_in_ms and disabled_client_side_validations validation issuesfeat: support api_url configuration option and deprecate api_scheme and api_host
api_url configuration option and deprecate api_scheme and api_hostapi_url configuration option and deprecate api_scheme and api_hostBREAKING CHANGES: Note: This release comes with substantial breaking changes, especially to the interfaces due to the protobuf changes in the last rel…
BREAKING CHANGES: Note: This release comes with substantial breaking changes, especially to the interfaces due to the protobuf changes in the last release.
While the http interfaces did not break (you can still use v0.3.3 SDK with a v1.3.8+ server),
the grpc interface did and this caused a few changes in the interfaces of the SDK.
If you are using OpenFgaClient, the changes required should be smaller, if you are using OpenFgaApi a bit more changes will be needed.
You will have to modify some parts of your code, but we hope this will be to the better as a lot of the parameters are now correctly marked as required,
Some of the changes to expect:
CheckRequest: the TupleKey field is now of interface CheckRequestTupleKey, you can also now pass in ContextExpandRequest: the TupleKey field is now of interface ExpandRequestTupleKeyReadRequest: the TupleKey field is now of interface ReadRequestTupleKeyWriteRequest: now takes WriteRequestWrites and WriteRequestDeletes, the latter of which accepts TupleKeyWithoutConditionCreateStoreResponseGetStoreResponseListStoresResponseListObjectsResponseReadChangesResponseReadResponseAuthorizationModelTake a look at the changes in models in https://github.com/openfga/python-sdk/commit/9ed1f70d64db71451de2eb26e330bbd511625c5c and https://github.com/openfga/python-sdk/pull/59/files for more.
[BREAKING CHANGE] Please see release notes for v0.4.0
[BREAKING CHANGE] Please see release notes for v0.4.0
Note: v0.3.4 has been re-released as v0.4.0 due to breaking changes
fix: correct type hints for list_relations
feat: allow passing ssl certs to client configuration (#51 , thanks @IsmaelMT)
chore(deps): reduce min urllib3 to 1.25.11, add dependabot & bump deps
feat(client): introduce synchronous OpenFgaClient
fix(client): fix a crash when calling check with contextual tuples
\[BREAKING\] feat\!: schema_version is now required when calling write_authorization_model
Changes:
schema_version is now required when calling write_authorization_modelv0.1.1 docs for the OpenFgaApi docsbatch_check to check multiple tuples in parallellist_relations to check in one call whether a user has multiple relations to an objectswrite15chore(deps): upgrade dependencies
Updated to include support for OpenFGA 0.3.0
Updated to include support for OpenFGA 0.3.0
Changes:
{"object_ids":["roadmap"]}, will now be {"objects":["document:roadmap"]}Fixes:
Updated to include support for OpenFGA 0.3.0
Changes:
{"object_ids":["roadmap"]}, will now be {"objects":["document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a"]}Fixes:
Initial OpenFGA Python SDK release
One column per quarter.