diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 43be8fb..15e5975 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -31,7 +31,7 @@ jobs: python-version: ${{ matrix.python-version }} cache: "pip" cache-dependency-path: | - **/setup.cfg + **/pyproject.toml **/requirements*.txt **/test-requirements*.txt @@ -39,20 +39,8 @@ jobs: run: pip install -r test-requirements.txt --upgrade pip - if: matrix.python-version == '3.10' - name: Run Flake8 - run: flake8 . --count --show-source --statistics - - - if: matrix.python-version == '3.10' - name: Run Black - run: black . --check - - - if: matrix.python-version == '3.10' - name: Run isort - run: isort . --profile black --diff --check-only - - - if: matrix.python-version == '3.10' - name: Run autoflake - run: autoflake --exclude=__init__.py --remove-unused-variables --remove-all-unused-imports --quiet --check-diff --recursive . + name: Run `ruff` + run: ruff check - name: Run tests and collect coverage run: pytest --cov-fail-under 60 --cov openfga_sdk @@ -84,7 +72,7 @@ jobs: python-version: "3.10" cache: "pip" cache-dependency-path: | - **/setup.cfg + **/pyproject.toml **/requirements*.txt **/test-requirements*.txt diff --git a/.gitignore b/.gitignore index a875858..a0292cc 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,7 @@ venv/ .venv/ .python-version .pytest_cache +.ruff_cache test/__pycache__/ # Translations diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 2e6a0ec..56a5dff 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -14,3 +14,4 @@ test/* .gitlab-ci.yml .travis.yml tox.ini +setup.cfg diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 86fde12..df90346 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -260,8 +260,8 @@ openfga_sdk/telemetry/metrics.py openfga_sdk/telemetry/telemetry.py openfga_sdk/telemetry/utilities.py openfga_sdk/validation.py +pyproject.toml requirements.txt -setup.cfg setup.py test-requirements.txt test/_/configuration_test.py diff --git a/example/example1/example1.py b/example/example1/example1.py index 9964835..50cecf0 100644 --- a/example/example1/example1.py +++ b/example/example1/example1.py @@ -1,3 +1,17 @@ +# ruff: noqa: E402 + +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + import asyncio import os import sys @@ -5,6 +19,7 @@ from dotenv import load_dotenv + sdk_path = os.path.realpath(os.path.join(os.path.abspath(__file__), "..", "..", "..")) sys.path.insert(0, sdk_path) diff --git a/example/example1/setup.py b/example/example1/setup.py index aba37d3..7fedda7 100644 --- a/example/example1/setup.py +++ b/example/example1/setup.py @@ -1,17 +1,18 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 0.1 - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://discord.gg/8naAwJfWN6 - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from setuptools import find_packages, setup + NAME = "example1" VERSION = "0.0.1" REQUIRES = ["openfga-sdk >= 0.9.1"] diff --git a/example/opentelemetry/main.py b/example/opentelemetry/main.py index 8a3a5da..af8e6ae 100644 --- a/example/opentelemetry/main.py +++ b/example/opentelemetry/main.py @@ -1,6 +1,21 @@ +# ruff: noqa: E402 + +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + import asyncio import os import sys + from operator import attrgetter from random import randint from typing import Any @@ -15,6 +30,7 @@ ) from opentelemetry.sdk.resources import SERVICE_NAME, Resource + # For usage convenience of this example, we will import the OpenFGA SDK from the parent directory. sdk_path = os.path.realpath(os.path.join(os.path.abspath(__file__), "..", "..", "..")) sys.path.insert(0, sdk_path) @@ -199,16 +215,15 @@ async def main(): print(f"Making {checks_requests} checks ...", end=" ") for _ in range(checks_requests): try: - allowed = app().unpack( - await fga_client.check( - body=ClientCheckRequest( - user="user:anne", relation="owner", object="folder:foo" - ), + await fga_client.check( + body=ClientCheckRequest( + user="user:anne", relation="owner", object="folder:foo" ), - "allowed", ) + except FgaValidationException as error: print(f"Checked failed due to validation exception: {error}") + print("Done!") diff --git a/example/opentelemetry/setup.py b/example/opentelemetry/setup.py index d3dac6b..bb32782 100644 --- a/example/opentelemetry/setup.py +++ b/example/opentelemetry/setup.py @@ -1,17 +1,18 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 0.1 - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://discord.gg/8naAwJfWN6 - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from setuptools import find_packages, setup + NAME = "openfga-opentelemetry-example" VERSION = "0.0.1" REQUIRES = [""] diff --git a/example/streamed-list-objects/asynchronous.py b/example/streamed-list-objects/asynchronous.py index 8d34d1f..ec89bb1 100644 --- a/example/streamed-list-objects/asynchronous.py +++ b/example/streamed-list-objects/asynchronous.py @@ -1,12 +1,28 @@ +# ruff: noqa: E402 + +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + import asyncio import json import os import sys + from operator import attrgetter from typing import Any from dotenv import load_dotenv + sdk_path = os.path.realpath(os.path.join(os.path.abspath(__file__), "..", "..", "..")) sys.path.insert(0, sdk_path) @@ -72,7 +88,7 @@ async def main(): ) print(f"Created temporary authorization model ({model})") - print(f"Writing 100 mock tuples to store.") + print("Writing 100 mock tuples to store.") # Write mock data writes = [] @@ -111,7 +127,7 @@ async def main(): try: await fga_client.delete_store() print(f"Deleted temporary store ({store})") - except: + except Exception: pass print("Finished.") diff --git a/example/streamed-list-objects/setup.py b/example/streamed-list-objects/setup.py index a8d1333..f8e3670 100644 --- a/example/streamed-list-objects/setup.py +++ b/example/streamed-list-objects/setup.py @@ -1,17 +1,18 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 0.1 - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://discord.gg/8naAwJfWN6 - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from setuptools import find_packages, setup + NAME = "openfga-streamed-list-objects-example" VERSION = "0.0.1" REQUIRES = [""] diff --git a/example/streamed-list-objects/synchronous.py b/example/streamed-list-objects/synchronous.py index e560a1d..58161e7 100644 --- a/example/streamed-list-objects/synchronous.py +++ b/example/streamed-list-objects/synchronous.py @@ -1,11 +1,27 @@ +# ruff: noqa: E402 + +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + import json import os import sys + from operator import attrgetter from typing import Any from dotenv import load_dotenv + sdk_path = os.path.realpath(os.path.join(os.path.abspath(__file__), "..", "..", "..")) sys.path.insert(0, sdk_path) @@ -69,7 +85,7 @@ def main(): ) print(f"Created temporary authorization model ({model})") - print(f"Writing 100 mock tuples to store.") + print("Writing 100 mock tuples to store.") # Write mock data writes = [] @@ -108,7 +124,7 @@ def main(): try: fga_client.delete_store() print(f"Deleted temporary store ({store})") - except: + except Exception: pass print("Finished.") diff --git a/openfga_sdk/__init__.py b/openfga_sdk/__init__.py index c9d0b75..cd477de 100644 --- a/openfga_sdk/__init__.py +++ b/openfga_sdk/__init__.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ __version__ = "0.9.1" @@ -142,3 +142,111 @@ TelemetryMetricConfiguration, TelemetryMetricsConfiguration, ) + + +__all__ = [ + "OpenFgaClient", + "ClientConfiguration", + "OpenFgaApi", + "ApiClient", + "Configuration", + "OpenApiException", + "FgaValidationException", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "AbortedMessageResponse", + "Any", + "Assertion", + "AssertionTupleKey", + "AuthErrorCode", + "AuthorizationModel", + "BatchCheckItem", + "BatchCheckRequest", + "BatchCheckResponse", + "BatchCheckSingleResult", + "CheckError", + "CheckRequest", + "CheckRequestTupleKey", + "CheckResponse", + "Computed", + "Condition", + "ConditionMetadata", + "ConditionParamTypeRef", + "ConsistencyPreference", + "ContextualTupleKeys", + "CreateStoreRequest", + "CreateStoreResponse", + "Difference", + "ErrorCode", + "ExpandRequest", + "ExpandRequestTupleKey", + "ExpandResponse", + "FgaObject", + "ForbiddenResponse", + "GetStoreResponse", + "InternalErrorCode", + "InternalErrorMessageResponse", + "Leaf", + "ListObjectsRequest", + "ListObjectsResponse", + "ListStoresResponse", + "ListUsersRequest", + "ListUsersResponse", + "Metadata", + "Node", + "Nodes", + "NotFoundErrorCode", + "NullValue", + "ObjectRelation", + "PathUnknownErrorMessageResponse", + "ReadAssertionsResponse", + "ReadAuthorizationModelResponse", + "ReadAuthorizationModelsResponse", + "ReadChangesResponse", + "ReadRequest", + "ReadRequestTupleKey", + "ReadResponse", + "RelationMetadata", + "RelationReference", + "RelationshipCondition", + "SourceInfo", + "Status", + "Store", + "StreamResultOfStreamedListObjectsResponse", + "StreamedListObjectsResponse", + "Tuple", + "TupleChange", + "TupleKey", + "TupleKeyWithoutCondition", + "TupleOperation", + "TupleToUserset", + "TypeDefinition", + "TypeName", + "TypedWildcard", + "UnauthenticatedResponse", + "UnprocessableContentErrorCode", + "UnprocessableContentMessageResponse", + "User", + "UserTypeFilter", + "Users", + "Userset", + "UsersetTree", + "UsersetTreeDifference", + "UsersetTreeTupleToUserset", + "UsersetUser", + "Usersets", + "ValidationErrorMessageResponse", + "WriteAssertionsRequest", + "WriteAuthorizationModelRequest", + "WriteAuthorizationModelResponse", + "WriteRequest", + "WriteRequestDeletes", + "WriteRequestWrites", + "TelemetryConfiguration", + "TelemetryConfigurations", + "TelemetryConfigurationType", + "TelemetryMetricConfiguration", + "TelemetryMetricsConfiguration", +] diff --git a/openfga_sdk/api/__init__.py b/openfga_sdk/api/__init__.py index 703cde7..909d77b 100644 --- a/openfga_sdk/api/__init__.py +++ b/openfga_sdk/api/__init__.py @@ -1 +1,18 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + from openfga_sdk.api.open_fga_api import OpenFgaApi + + +__all__ = [ + "OpenFgaApi", +] diff --git a/openfga_sdk/api/open_fga_api.py b/openfga_sdk/api/open_fga_api.py index 8bbfb94..2845e94 100644 --- a/openfga_sdk/api/open_fga_api.py +++ b/openfga_sdk/api/open_fga_api.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.api_client import ApiClient @@ -311,7 +311,7 @@ async def check_with_http_info(self, body, **kwargs): for key, val in local_var_params["kwargs"].items(): if key not in all_params: raise FgaValidationException( - "Got an unexpected keyword argument '%s'" " to method check" % key + "Got an unexpected keyword argument '%s' to method check" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -809,7 +809,7 @@ async def expand_with_http_info(self, body, **kwargs): for key, val in local_var_params["kwargs"].items(): if key not in all_params: raise FgaValidationException( - "Got an unexpected keyword argument '%s'" " to method expand" % key + "Got an unexpected keyword argument '%s' to method expand" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -986,8 +986,7 @@ async def get_store_with_http_info(self, **kwargs): for key, val in local_var_params["kwargs"].items(): if key not in all_params: raise FgaValidationException( - "Got an unexpected keyword argument '%s'" - " to method get_store" % key + "Got an unexpected keyword argument '%s' to method get_store" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -1496,8 +1495,7 @@ async def list_users_with_http_info(self, body, **kwargs): for key, val in local_var_params["kwargs"].items(): if key not in all_params: raise FgaValidationException( - "Got an unexpected keyword argument '%s'" - " to method list_users" % key + "Got an unexpected keyword argument '%s' to method list_users" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -1678,7 +1676,7 @@ async def read_with_http_info(self, body, **kwargs): for key, val in local_var_params["kwargs"].items(): if key not in all_params: raise FgaValidationException( - "Got an unexpected keyword argument '%s'" " to method read" % key + "Got an unexpected keyword argument '%s' to method read" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -2751,7 +2749,7 @@ async def write_with_http_info(self, body, **kwargs): for key, val in local_var_params["kwargs"].items(): if key not in all_params: raise FgaValidationException( - "Got an unexpected keyword argument '%s'" " to method write" % key + "Got an unexpected keyword argument '%s' to method write" % key ) local_var_params[key] = val del local_var_params["kwargs"] diff --git a/openfga_sdk/api_client.py b/openfga_sdk/api_client.py index 00d19ee..669ec49 100644 --- a/openfga_sdk/api_client.py +++ b/openfga_sdk/api_client.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import asyncio @@ -19,11 +19,13 @@ import re import time import urllib + from multiprocessing.pool import ThreadPool from dateutil.parser import parse import openfga_sdk.models + from openfga_sdk import oauth2, rest from openfga_sdk.configuration import Configuration from openfga_sdk.exceptions import ( @@ -36,6 +38,7 @@ from openfga_sdk.telemetry import Telemetry from openfga_sdk.telemetry.attributes import TelemetryAttribute, TelemetryAttributes + DEFAULT_USER_AGENT = "openfga-sdk python/0.9.1" @@ -169,7 +172,6 @@ async def __call_api( _telemetry_attributes: dict[TelemetryAttribute, str | int] = None, _streaming: bool = False, ): - self.configuration.is_valid() config = self.configuration start = float(time.time()) @@ -479,14 +481,17 @@ def __deserialize(self, data, klass): if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) - elif klass == object: + + if klass is object: return self.__deserialize_object(data) - elif klass == datetime.date: + + if klass is datetime.date: return self.__deserialize_date(data) - elif klass == datetime.datetime: + + if klass is datetime.datetime: return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) + + return self.__deserialize_model(data, klass) async def call_api( self, diff --git a/openfga_sdk/client/__init__.py b/openfga_sdk/client/__init__.py index fb3389c..b6d1de3 100644 --- a/openfga_sdk/client/__init__.py +++ b/openfga_sdk/client/__init__.py @@ -1,15 +1,22 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.client import OpenFgaClient from openfga_sdk.client.configuration import ClientConfiguration from openfga_sdk.client.models.check_request import ClientCheckRequest + + +__all__ = [ + "OpenFgaClient", + "ClientConfiguration", + "ClientCheckRequest", +] diff --git a/openfga_sdk/client/client.py b/openfga_sdk/client/client.py index 59d44c0..e8c8dc3 100644 --- a/openfga_sdk/client/client.py +++ b/openfga_sdk/client/client.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import asyncio @@ -22,9 +22,7 @@ construct_batch_item, ) from openfga_sdk.client.models.batch_check_request import ClientBatchCheckRequest -from openfga_sdk.client.models.batch_check_response import ( - ClientBatchCheckResponse, -) +from openfga_sdk.client.models.batch_check_response import ClientBatchCheckResponse from openfga_sdk.client.models.batch_check_single_response import ( ClientBatchCheckSingleResponse, ) @@ -77,6 +75,7 @@ from openfga_sdk.models.write_request import WriteRequest from openfga_sdk.validation import is_well_formed_ulid_string + CLIENT_METHOD_HEADER = "X-OpenFGA-Client-Method" CLIENT_BULK_REQUEST_ID_HEADER = "X-OpenFGA-Client-Bulk-Request-Id" diff --git a/openfga_sdk/client/configuration.py b/openfga_sdk/client/configuration.py index fa68fbe..041eeee 100644 --- a/openfga_sdk/client/configuration.py +++ b/openfga_sdk/client/configuration.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.configuration import Configuration diff --git a/openfga_sdk/client/models/__init__.py b/openfga_sdk/client/models/__init__.py index 4ff9763..a43a320 100644 --- a/openfga_sdk/client/models/__init__.py +++ b/openfga_sdk/client/models/__init__.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.assertion import ClientAssertion @@ -29,3 +29,22 @@ from openfga_sdk.client.models.write_request import ClientWriteRequest from openfga_sdk.client.models.write_response import ClientWriteResponse from openfga_sdk.client.models.write_transaction_opts import WriteTransactionOpts + + +__all__ = [ + "ClientAssertion", + "ClientBatchCheckItem", + "ClientBatchCheckRequest", + "ClientBatchCheckResponse", + "ClientBatchCheckSingleResponse", + "ClientCheckRequest", + "ClientBatchCheckClientResponse", + "ClientExpandRequest", + "ClientListObjectsRequest", + "ClientListRelationsRequest", + "ClientReadChangesRequest", + "ClientTuple", + "ClientWriteRequest", + "ClientWriteResponse", + "WriteTransactionOpts", +] diff --git a/openfga_sdk/client/models/assertion.py b/openfga_sdk/client/models/assertion.py index 62b68a2..7389e32 100644 --- a/openfga_sdk/client/models/assertion.py +++ b/openfga_sdk/client/models/assertion.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ diff --git a/openfga_sdk/client/models/batch_check_item.py b/openfga_sdk/client/models/batch_check_item.py index f29fe77..f11e38e 100644 --- a/openfga_sdk/client/models/batch_check_item.py +++ b/openfga_sdk/client/models/batch_check_item.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.tuple import ClientTuple, convert_tuple_keys diff --git a/openfga_sdk/client/models/batch_check_request.py b/openfga_sdk/client/models/batch_check_request.py index d81c437..76c0f2b 100644 --- a/openfga_sdk/client/models/batch_check_request.py +++ b/openfga_sdk/client/models/batch_check_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.batch_check_item import ClientBatchCheckItem diff --git a/openfga_sdk/client/models/batch_check_response.py b/openfga_sdk/client/models/batch_check_response.py index bdc9621..c3bc075 100644 --- a/openfga_sdk/client/models/batch_check_response.py +++ b/openfga_sdk/client/models/batch_check_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.batch_check_single_response import ( diff --git a/openfga_sdk/client/models/batch_check_single_response.py b/openfga_sdk/client/models/batch_check_single_response.py index 69c020d..2b61ed1 100644 --- a/openfga_sdk/client/models/batch_check_single_response.py +++ b/openfga_sdk/client/models/batch_check_single_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.tuple import ClientTuple diff --git a/openfga_sdk/client/models/check_request.py b/openfga_sdk/client/models/check_request.py index aa2a717..4653766 100644 --- a/openfga_sdk/client/models/check_request.py +++ b/openfga_sdk/client/models/check_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.tuple import ClientTuple diff --git a/openfga_sdk/client/models/client_batch_check_response.py b/openfga_sdk/client/models/client_batch_check_response.py index 0c38dff..17fe207 100644 --- a/openfga_sdk/client/models/client_batch_check_response.py +++ b/openfga_sdk/client/models/client_batch_check_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.check_request import ClientCheckRequest diff --git a/openfga_sdk/client/models/expand_request.py b/openfga_sdk/client/models/expand_request.py index 6192926..222169c 100644 --- a/openfga_sdk/client/models/expand_request.py +++ b/openfga_sdk/client/models/expand_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.tuple import ClientTuple diff --git a/openfga_sdk/client/models/list_objects_request.py b/openfga_sdk/client/models/list_objects_request.py index 01ad190..d63e767 100644 --- a/openfga_sdk/client/models/list_objects_request.py +++ b/openfga_sdk/client/models/list_objects_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.tuple import ClientTuple diff --git a/openfga_sdk/client/models/list_relations_request.py b/openfga_sdk/client/models/list_relations_request.py index cd20acc..ca91b18 100644 --- a/openfga_sdk/client/models/list_relations_request.py +++ b/openfga_sdk/client/models/list_relations_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.tuple import ClientTuple diff --git a/openfga_sdk/client/models/list_users_request.py b/openfga_sdk/client/models/list_users_request.py index 988b072..27a00c1 100644 --- a/openfga_sdk/client/models/list_users_request.py +++ b/openfga_sdk/client/models/list_users_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.tuple import ClientTuple diff --git a/openfga_sdk/client/models/read_changes_request.py b/openfga_sdk/client/models/read_changes_request.py index 9b99aeb..14f4cad 100644 --- a/openfga_sdk/client/models/read_changes_request.py +++ b/openfga_sdk/client/models/read_changes_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ diff --git a/openfga_sdk/client/models/tuple.py b/openfga_sdk/client/models/tuple.py index e401a6f..23246ba 100644 --- a/openfga_sdk/client/models/tuple.py +++ b/openfga_sdk/client/models/tuple.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.models.relationship_condition import RelationshipCondition diff --git a/openfga_sdk/client/models/write_request.py b/openfga_sdk/client/models/write_request.py index 5bbf79e..8136428 100644 --- a/openfga_sdk/client/models/write_request.py +++ b/openfga_sdk/client/models/write_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.tuple import ClientTuple, convert_tuple_keys diff --git a/openfga_sdk/client/models/write_response.py b/openfga_sdk/client/models/write_response.py index 7f5b24d..c35e799 100644 --- a/openfga_sdk/client/models/write_response.py +++ b/openfga_sdk/client/models/write_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.write_single_response import ClientWriteSingleResponse diff --git a/openfga_sdk/client/models/write_single_response.py b/openfga_sdk/client/models/write_single_response.py index 1f639fb..b6eebee 100644 --- a/openfga_sdk/client/models/write_single_response.py +++ b/openfga_sdk/client/models/write_single_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.client.models.tuple import ClientTuple diff --git a/openfga_sdk/client/models/write_transaction_opts.py b/openfga_sdk/client/models/write_transaction_opts.py index 2b3b9ed..f222dab 100644 --- a/openfga_sdk/client/models/write_transaction_opts.py +++ b/openfga_sdk/client/models/write_transaction_opts.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ diff --git a/openfga_sdk/configuration.py b/openfga_sdk/configuration.py index 4be1370..8c6e105 100644 --- a/openfga_sdk/configuration.py +++ b/openfga_sdk/configuration.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import copy @@ -166,20 +166,16 @@ def __init__( server_operation_variables=None, ssl_ca_cert=None, api_url=None, # TODO: restructure when removing api_scheme/api_host - telemetry: ( - dict[ - TelemetryConfigurationType | str, - TelemetryMetricsConfiguration - | dict[ - TelemetryHistogram | TelemetryCounter, - TelemetryMetricConfiguration - | dict[TelemetryAttribute, bool] - | None, - ] - | None, + telemetry: dict[ + TelemetryConfigurationType | str, + TelemetryMetricsConfiguration + | dict[ + TelemetryHistogram | TelemetryCounter, + TelemetryMetricConfiguration | dict[TelemetryAttribute, bool] | None, ] - | None - ) = None, + | None, + ] + | None = None, timeout_millisec: int | None = None, ): """Constructor""" diff --git a/openfga_sdk/credentials.py b/openfga_sdk/credentials.py index acd25b5..c2bcdf2 100644 --- a/openfga_sdk/credentials.py +++ b/openfga_sdk/credentials.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from urllib.parse import urlparse, urlunparse @@ -216,6 +216,6 @@ def validate_credentials_config(self): raise ApiValueError( "configuration `{}` requires client_id, client_secret, api_audience and api_issuer defined for client_credentials method." ) - # validate token issuer + # validate token issuer self._parse_issuer(self.configuration.api_issuer) diff --git a/openfga_sdk/exceptions.py b/openfga_sdk/exceptions.py index bb7c664..483624e 100644 --- a/openfga_sdk/exceptions.py +++ b/openfga_sdk/exceptions.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ # Specifc FGA header to be parsed @@ -114,7 +114,6 @@ def __init__(self, msg, path_to_item=None): class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None): if http_resp: try: @@ -139,7 +138,7 @@ def __init__(self, status=None, reason=None, http_resp=None): def __str__(self): """Custom error messages for exception""" - error_message = "({})\n" "Reason: {}\n".format(self.status, self.reason) + error_message = "({})\nReason: {}\n".format(self.status, self.reason) if self.body: error_message += f"HTTP response body: {self.body}\n" @@ -162,43 +161,36 @@ def parsed_exception(self, content): class NotFoundException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): super().__init__(status, reason, http_resp) class UnauthorizedException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): super().__init__(status, reason, http_resp) class ForbiddenException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): super().__init__(status, reason, http_resp) class ServiceException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): super().__init__(status, reason, http_resp) class ValidationException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): super().__init__(status, reason, http_resp) class AuthenticationError(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): super().__init__(status, reason, http_resp) class RateLimitExceededError(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): super().__init__(status, reason, http_resp) diff --git a/openfga_sdk/help.py b/openfga_sdk/help.py index c6017ef..28ecef4 100644 --- a/openfga_sdk/help.py +++ b/openfga_sdk/help.py @@ -1,12 +1,26 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + import json import platform import sys + from collections import OrderedDict import opentelemetry.version from . import __version__ as openfga_sdk_version + try: import urllib3 diff --git a/openfga_sdk/models/__init__.py b/openfga_sdk/models/__init__.py index 50c8283..c29d1d3 100644 --- a/openfga_sdk/models/__init__.py +++ b/openfga_sdk/models/__init__.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.models.aborted_message_response import AbortedMessageResponse @@ -120,3 +120,95 @@ from openfga_sdk.models.write_request import WriteRequest from openfga_sdk.models.write_request_deletes import WriteRequestDeletes from openfga_sdk.models.write_request_writes import WriteRequestWrites + + +__all__ = [ + "AbortedMessageResponse", + "Any", + "Assertion", + "AssertionTupleKey", + "AuthErrorCode", + "AuthorizationModel", + "BatchCheckItem", + "BatchCheckRequest", + "BatchCheckResponse", + "BatchCheckSingleResult", + "CheckError", + "CheckRequest", + "CheckRequestTupleKey", + "CheckResponse", + "Computed", + "Condition", + "ConditionMetadata", + "ConditionParamTypeRef", + "ConsistencyPreference", + "ContextualTupleKeys", + "CreateStoreRequest", + "CreateStoreResponse", + "Difference", + "ErrorCode", + "ExpandRequest", + "ExpandRequestTupleKey", + "ExpandResponse", + "FgaObject", + "ForbiddenResponse", + "GetStoreResponse", + "InternalErrorCode", + "InternalErrorMessageResponse", + "Leaf", + "ListObjectsRequest", + "ListObjectsResponse", + "ListStoresResponse", + "ListUsersRequest", + "ListUsersResponse", + "Metadata", + "Node", + "Nodes", + "NotFoundErrorCode", + "NullValue", + "ObjectRelation", + "PathUnknownErrorMessageResponse", + "ReadAssertionsResponse", + "ReadAuthorizationModelResponse", + "ReadAuthorizationModelsResponse", + "ReadChangesResponse", + "ReadRequest", + "ReadRequestTupleKey", + "ReadResponse", + "RelationMetadata", + "RelationReference", + "RelationshipCondition", + "SourceInfo", + "Status", + "Store", + "StreamResultOfStreamedListObjectsResponse", + "StreamedListObjectsResponse", + "Tuple", + "TupleChange", + "TupleKey", + "TupleKeyWithoutCondition", + "TupleOperation", + "TupleToUserset", + "TypeDefinition", + "TypeName", + "TypedWildcard", + "UnauthenticatedResponse", + "UnprocessableContentErrorCode", + "UnprocessableContentMessageResponse", + "User", + "UserTypeFilter", + "Users", + "Userset", + "UsersetTree", + "UsersetTreeDifference", + "UsersetTreeTupleToUserset", + "UsersetUser", + "Usersets", + "ValidationErrorMessageResponse", + "WriteAssertionsRequest", + "WriteAuthorizationModelRequest", + "WriteAuthorizationModelResponse", + "WriteRequest", + "WriteRequestDeletes", + "WriteRequestWrites", +] diff --git a/openfga_sdk/models/aborted_message_response.py b/openfga_sdk/models/aborted_message_response.py index 7730ba6..8150d35 100644 --- a/openfga_sdk/models/aborted_message_response.py +++ b/openfga_sdk/models/aborted_message_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/any.py b/openfga_sdk/models/any.py index 65be319..2b1214b 100644 --- a/openfga_sdk/models/any.py +++ b/openfga_sdk/models/any.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/assertion.py b/openfga_sdk/models/assertion.py index 8142de6..9938475 100644 --- a/openfga_sdk/models/assertion.py +++ b/openfga_sdk/models/assertion.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/assertion_tuple_key.py b/openfga_sdk/models/assertion_tuple_key.py index 5c3a5bc..fcc6472 100644 --- a/openfga_sdk/models/assertion_tuple_key.py +++ b/openfga_sdk/models/assertion_tuple_key.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/auth_error_code.py b/openfga_sdk/models/auth_error_code.py index 64a6f30..7a457e8 100644 --- a/openfga_sdk/models/auth_error_code.py +++ b/openfga_sdk/models/auth_error_code.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/authorization_model.py b/openfga_sdk/models/authorization_model.py index 6807e55..0701fbd 100644 --- a/openfga_sdk/models/authorization_model.py +++ b/openfga_sdk/models/authorization_model.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/batch_check_item.py b/openfga_sdk/models/batch_check_item.py index bd1179e..83f8397 100644 --- a/openfga_sdk/models/batch_check_item.py +++ b/openfga_sdk/models/batch_check_item.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/batch_check_request.py b/openfga_sdk/models/batch_check_request.py index 71bd65c..4357b9c 100644 --- a/openfga_sdk/models/batch_check_request.py +++ b/openfga_sdk/models/batch_check_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/batch_check_response.py b/openfga_sdk/models/batch_check_response.py index a9c9f13..5c5f38f 100644 --- a/openfga_sdk/models/batch_check_response.py +++ b/openfga_sdk/models/batch_check_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/batch_check_single_result.py b/openfga_sdk/models/batch_check_single_result.py index 1378af3..f51d791 100644 --- a/openfga_sdk/models/batch_check_single_result.py +++ b/openfga_sdk/models/batch_check_single_result.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/check_error.py b/openfga_sdk/models/check_error.py index 54b2187..ce687c9 100644 --- a/openfga_sdk/models/check_error.py +++ b/openfga_sdk/models/check_error.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/check_request.py b/openfga_sdk/models/check_request.py index 0bbc9d4..3ba2284 100644 --- a/openfga_sdk/models/check_request.py +++ b/openfga_sdk/models/check_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/check_request_tuple_key.py b/openfga_sdk/models/check_request_tuple_key.py index d7afdff..ec7197c 100644 --- a/openfga_sdk/models/check_request_tuple_key.py +++ b/openfga_sdk/models/check_request_tuple_key.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/check_response.py b/openfga_sdk/models/check_response.py index 9a81a87..aa51541 100644 --- a/openfga_sdk/models/check_response.py +++ b/openfga_sdk/models/check_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/computed.py b/openfga_sdk/models/computed.py index 6d31542..84c3b11 100644 --- a/openfga_sdk/models/computed.py +++ b/openfga_sdk/models/computed.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/condition.py b/openfga_sdk/models/condition.py index d8ee06a..228f31d 100644 --- a/openfga_sdk/models/condition.py +++ b/openfga_sdk/models/condition.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/condition_metadata.py b/openfga_sdk/models/condition_metadata.py index 8869a57..8f5c9a4 100644 --- a/openfga_sdk/models/condition_metadata.py +++ b/openfga_sdk/models/condition_metadata.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/condition_param_type_ref.py b/openfga_sdk/models/condition_param_type_ref.py index c932aae..76d9efa 100644 --- a/openfga_sdk/models/condition_param_type_ref.py +++ b/openfga_sdk/models/condition_param_type_ref.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/consistency_preference.py b/openfga_sdk/models/consistency_preference.py index 7340dc5..e6593e3 100644 --- a/openfga_sdk/models/consistency_preference.py +++ b/openfga_sdk/models/consistency_preference.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/contextual_tuple_keys.py b/openfga_sdk/models/contextual_tuple_keys.py index ac73088..9656778 100644 --- a/openfga_sdk/models/contextual_tuple_keys.py +++ b/openfga_sdk/models/contextual_tuple_keys.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/create_store_request.py b/openfga_sdk/models/create_store_request.py index c5afaa2..6d989cb 100644 --- a/openfga_sdk/models/create_store_request.py +++ b/openfga_sdk/models/create_store_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/create_store_response.py b/openfga_sdk/models/create_store_response.py index 21949bd..2c27808 100644 --- a/openfga_sdk/models/create_store_response.py +++ b/openfga_sdk/models/create_store_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/difference.py b/openfga_sdk/models/difference.py index bc49fa5..f343ea9 100644 --- a/openfga_sdk/models/difference.py +++ b/openfga_sdk/models/difference.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/error_code.py b/openfga_sdk/models/error_code.py index b67ebaa..695765a 100644 --- a/openfga_sdk/models/error_code.py +++ b/openfga_sdk/models/error_code.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/expand_request.py b/openfga_sdk/models/expand_request.py index ff33b1b..6c59682 100644 --- a/openfga_sdk/models/expand_request.py +++ b/openfga_sdk/models/expand_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/expand_request_tuple_key.py b/openfga_sdk/models/expand_request_tuple_key.py index b1b368f..cdc544f 100644 --- a/openfga_sdk/models/expand_request_tuple_key.py +++ b/openfga_sdk/models/expand_request_tuple_key.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/expand_response.py b/openfga_sdk/models/expand_response.py index c5a89ca..2fdb336 100644 --- a/openfga_sdk/models/expand_response.py +++ b/openfga_sdk/models/expand_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/fga_object.py b/openfga_sdk/models/fga_object.py index effbbd0..a6254e5 100644 --- a/openfga_sdk/models/fga_object.py +++ b/openfga_sdk/models/fga_object.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/forbidden_response.py b/openfga_sdk/models/forbidden_response.py index 5cd19ed..5f1f350 100644 --- a/openfga_sdk/models/forbidden_response.py +++ b/openfga_sdk/models/forbidden_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/get_store_response.py b/openfga_sdk/models/get_store_response.py index 5296e5e..ae2997f 100644 --- a/openfga_sdk/models/get_store_response.py +++ b/openfga_sdk/models/get_store_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/internal_error_code.py b/openfga_sdk/models/internal_error_code.py index 1dd969d..1e4b3b4 100644 --- a/openfga_sdk/models/internal_error_code.py +++ b/openfga_sdk/models/internal_error_code.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/internal_error_message_response.py b/openfga_sdk/models/internal_error_message_response.py index 21ea52f..0c30fd5 100644 --- a/openfga_sdk/models/internal_error_message_response.py +++ b/openfga_sdk/models/internal_error_message_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/leaf.py b/openfga_sdk/models/leaf.py index de1bc3b..60ee85f 100644 --- a/openfga_sdk/models/leaf.py +++ b/openfga_sdk/models/leaf.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/list_objects_request.py b/openfga_sdk/models/list_objects_request.py index a8f2e41..16e1a71 100644 --- a/openfga_sdk/models/list_objects_request.py +++ b/openfga_sdk/models/list_objects_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/list_objects_response.py b/openfga_sdk/models/list_objects_response.py index e1d1bfc..0df985e 100644 --- a/openfga_sdk/models/list_objects_response.py +++ b/openfga_sdk/models/list_objects_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/list_stores_response.py b/openfga_sdk/models/list_stores_response.py index da386ae..9e66f04 100644 --- a/openfga_sdk/models/list_stores_response.py +++ b/openfga_sdk/models/list_stores_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/list_users_request.py b/openfga_sdk/models/list_users_request.py index 27422e2..238a1e6 100644 --- a/openfga_sdk/models/list_users_request.py +++ b/openfga_sdk/models/list_users_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/list_users_response.py b/openfga_sdk/models/list_users_response.py index 5cd3aed..c8a2ed3 100644 --- a/openfga_sdk/models/list_users_response.py +++ b/openfga_sdk/models/list_users_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/metadata.py b/openfga_sdk/models/metadata.py index 260681e..bcbcd87 100644 --- a/openfga_sdk/models/metadata.py +++ b/openfga_sdk/models/metadata.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/node.py b/openfga_sdk/models/node.py index f61546b..609918a 100644 --- a/openfga_sdk/models/node.py +++ b/openfga_sdk/models/node.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/nodes.py b/openfga_sdk/models/nodes.py index 37473f6..3c5955a 100644 --- a/openfga_sdk/models/nodes.py +++ b/openfga_sdk/models/nodes.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/not_found_error_code.py b/openfga_sdk/models/not_found_error_code.py index 80c89b6..9462823 100644 --- a/openfga_sdk/models/not_found_error_code.py +++ b/openfga_sdk/models/not_found_error_code.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/null_value.py b/openfga_sdk/models/null_value.py index a3eb72c..2abae30 100644 --- a/openfga_sdk/models/null_value.py +++ b/openfga_sdk/models/null_value.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/object_relation.py b/openfga_sdk/models/object_relation.py index 66444bb..069d924 100644 --- a/openfga_sdk/models/object_relation.py +++ b/openfga_sdk/models/object_relation.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/path_unknown_error_message_response.py b/openfga_sdk/models/path_unknown_error_message_response.py index 5a18cf9..9f81aa4 100644 --- a/openfga_sdk/models/path_unknown_error_message_response.py +++ b/openfga_sdk/models/path_unknown_error_message_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/read_assertions_response.py b/openfga_sdk/models/read_assertions_response.py index 5dd410d..7543ffd 100644 --- a/openfga_sdk/models/read_assertions_response.py +++ b/openfga_sdk/models/read_assertions_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/read_authorization_model_response.py b/openfga_sdk/models/read_authorization_model_response.py index f97bd99..0e6960e 100644 --- a/openfga_sdk/models/read_authorization_model_response.py +++ b/openfga_sdk/models/read_authorization_model_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/read_authorization_models_response.py b/openfga_sdk/models/read_authorization_models_response.py index f27ad6a..42ebdd8 100644 --- a/openfga_sdk/models/read_authorization_models_response.py +++ b/openfga_sdk/models/read_authorization_models_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/read_changes_response.py b/openfga_sdk/models/read_changes_response.py index 70bf67f..3ecc873 100644 --- a/openfga_sdk/models/read_changes_response.py +++ b/openfga_sdk/models/read_changes_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/read_request.py b/openfga_sdk/models/read_request.py index 451677d..5b043c3 100644 --- a/openfga_sdk/models/read_request.py +++ b/openfga_sdk/models/read_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/read_request_tuple_key.py b/openfga_sdk/models/read_request_tuple_key.py index a732fb7..bed602c 100644 --- a/openfga_sdk/models/read_request_tuple_key.py +++ b/openfga_sdk/models/read_request_tuple_key.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/read_response.py b/openfga_sdk/models/read_response.py index 94a40f2..c50f3aa 100644 --- a/openfga_sdk/models/read_response.py +++ b/openfga_sdk/models/read_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/relation_metadata.py b/openfga_sdk/models/relation_metadata.py index 99cf0d6..c81ac9b 100644 --- a/openfga_sdk/models/relation_metadata.py +++ b/openfga_sdk/models/relation_metadata.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/relation_reference.py b/openfga_sdk/models/relation_reference.py index 1926adf..dd35dd4 100644 --- a/openfga_sdk/models/relation_reference.py +++ b/openfga_sdk/models/relation_reference.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/relationship_condition.py b/openfga_sdk/models/relationship_condition.py index a3322cd..d282e0b 100644 --- a/openfga_sdk/models/relationship_condition.py +++ b/openfga_sdk/models/relationship_condition.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/source_info.py b/openfga_sdk/models/source_info.py index 1b2e995..214a86e 100644 --- a/openfga_sdk/models/source_info.py +++ b/openfga_sdk/models/source_info.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/status.py b/openfga_sdk/models/status.py index 420dd4d..e088415 100644 --- a/openfga_sdk/models/status.py +++ b/openfga_sdk/models/status.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/store.py b/openfga_sdk/models/store.py index d7c276b..43d25e8 100644 --- a/openfga_sdk/models/store.py +++ b/openfga_sdk/models/store.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/stream_result_of_streamed_list_objects_response.py b/openfga_sdk/models/stream_result_of_streamed_list_objects_response.py index ecb4a7f..d72f2dc 100644 --- a/openfga_sdk/models/stream_result_of_streamed_list_objects_response.py +++ b/openfga_sdk/models/stream_result_of_streamed_list_objects_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/streamed_list_objects_response.py b/openfga_sdk/models/streamed_list_objects_response.py index 042b936..087dcfb 100644 --- a/openfga_sdk/models/streamed_list_objects_response.py +++ b/openfga_sdk/models/streamed_list_objects_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/tuple.py b/openfga_sdk/models/tuple.py index a54c556..afe5340 100644 --- a/openfga_sdk/models/tuple.py +++ b/openfga_sdk/models/tuple.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/tuple_change.py b/openfga_sdk/models/tuple_change.py index d56ee16..c4710c9 100644 --- a/openfga_sdk/models/tuple_change.py +++ b/openfga_sdk/models/tuple_change.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/tuple_key.py b/openfga_sdk/models/tuple_key.py index 361765e..d9bdf23 100644 --- a/openfga_sdk/models/tuple_key.py +++ b/openfga_sdk/models/tuple_key.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/tuple_key_without_condition.py b/openfga_sdk/models/tuple_key_without_condition.py index 3a8b4b2..79ff24b 100644 --- a/openfga_sdk/models/tuple_key_without_condition.py +++ b/openfga_sdk/models/tuple_key_without_condition.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/tuple_operation.py b/openfga_sdk/models/tuple_operation.py index 59c6225..1b2e6d4 100644 --- a/openfga_sdk/models/tuple_operation.py +++ b/openfga_sdk/models/tuple_operation.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/tuple_to_userset.py b/openfga_sdk/models/tuple_to_userset.py index 2e33a05..f9d401f 100644 --- a/openfga_sdk/models/tuple_to_userset.py +++ b/openfga_sdk/models/tuple_to_userset.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/type_definition.py b/openfga_sdk/models/type_definition.py index c3b5002..feb4434 100644 --- a/openfga_sdk/models/type_definition.py +++ b/openfga_sdk/models/type_definition.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/type_name.py b/openfga_sdk/models/type_name.py index 65e7e53..006c0d2 100644 --- a/openfga_sdk/models/type_name.py +++ b/openfga_sdk/models/type_name.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/typed_wildcard.py b/openfga_sdk/models/typed_wildcard.py index 5e8939e..0494ea9 100644 --- a/openfga_sdk/models/typed_wildcard.py +++ b/openfga_sdk/models/typed_wildcard.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/unauthenticated_response.py b/openfga_sdk/models/unauthenticated_response.py index d85c036..ab88511 100644 --- a/openfga_sdk/models/unauthenticated_response.py +++ b/openfga_sdk/models/unauthenticated_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/unprocessable_content_error_code.py b/openfga_sdk/models/unprocessable_content_error_code.py index 490aeb7..012bd86 100644 --- a/openfga_sdk/models/unprocessable_content_error_code.py +++ b/openfga_sdk/models/unprocessable_content_error_code.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/unprocessable_content_message_response.py b/openfga_sdk/models/unprocessable_content_message_response.py index 1c2dd2b..abecf0f 100644 --- a/openfga_sdk/models/unprocessable_content_message_response.py +++ b/openfga_sdk/models/unprocessable_content_message_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/user.py b/openfga_sdk/models/user.py index 2c53d8e..e0ffdd5 100644 --- a/openfga_sdk/models/user.py +++ b/openfga_sdk/models/user.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/user_type_filter.py b/openfga_sdk/models/user_type_filter.py index 31d13d6..75215cf 100644 --- a/openfga_sdk/models/user_type_filter.py +++ b/openfga_sdk/models/user_type_filter.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/users.py b/openfga_sdk/models/users.py index 1b96299..aa887dd 100644 --- a/openfga_sdk/models/users.py +++ b/openfga_sdk/models/users.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/userset.py b/openfga_sdk/models/userset.py index 7d2fa50..8ef105c 100644 --- a/openfga_sdk/models/userset.py +++ b/openfga_sdk/models/userset.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/userset_tree.py b/openfga_sdk/models/userset_tree.py index ed06353..dbfdee4 100644 --- a/openfga_sdk/models/userset_tree.py +++ b/openfga_sdk/models/userset_tree.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/userset_tree_difference.py b/openfga_sdk/models/userset_tree_difference.py index 1488e21..5681d92 100644 --- a/openfga_sdk/models/userset_tree_difference.py +++ b/openfga_sdk/models/userset_tree_difference.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/userset_tree_tuple_to_userset.py b/openfga_sdk/models/userset_tree_tuple_to_userset.py index 3a44735..fcb23ae 100644 --- a/openfga_sdk/models/userset_tree_tuple_to_userset.py +++ b/openfga_sdk/models/userset_tree_tuple_to_userset.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/userset_user.py b/openfga_sdk/models/userset_user.py index aff964d..72a84ad 100644 --- a/openfga_sdk/models/userset_user.py +++ b/openfga_sdk/models/userset_user.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/usersets.py b/openfga_sdk/models/usersets.py index 685ccee..d66fc72 100644 --- a/openfga_sdk/models/usersets.py +++ b/openfga_sdk/models/usersets.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/validation_error_message_response.py b/openfga_sdk/models/validation_error_message_response.py index e71beee..5cf82d6 100644 --- a/openfga_sdk/models/validation_error_message_response.py +++ b/openfga_sdk/models/validation_error_message_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/write_assertions_request.py b/openfga_sdk/models/write_assertions_request.py index 4fad43c..4c97b3d 100644 --- a/openfga_sdk/models/write_assertions_request.py +++ b/openfga_sdk/models/write_assertions_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/write_authorization_model_request.py b/openfga_sdk/models/write_authorization_model_request.py index 68c3b0c..4424966 100644 --- a/openfga_sdk/models/write_authorization_model_request.py +++ b/openfga_sdk/models/write_authorization_model_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/write_authorization_model_response.py b/openfga_sdk/models/write_authorization_model_response.py index a40c1b9..87196bf 100644 --- a/openfga_sdk/models/write_authorization_model_response.py +++ b/openfga_sdk/models/write_authorization_model_response.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/write_request.py b/openfga_sdk/models/write_request.py index a783d3a..48fa290 100644 --- a/openfga_sdk/models/write_request.py +++ b/openfga_sdk/models/write_request.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/write_request_deletes.py b/openfga_sdk/models/write_request_deletes.py index 915d5f7..6b4b961 100644 --- a/openfga_sdk/models/write_request_deletes.py +++ b/openfga_sdk/models/write_request_deletes.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/models/write_request_writes.py b/openfga_sdk/models/write_request_writes.py index bb044ae..a2533ce 100644 --- a/openfga_sdk/models/write_request_writes.py +++ b/openfga_sdk/models/write_request_writes.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ try: diff --git a/openfga_sdk/oauth2.py b/openfga_sdk/oauth2.py index e463e61..dffe717 100644 --- a/openfga_sdk/oauth2.py +++ b/openfga_sdk/oauth2.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import asyncio @@ -15,6 +15,7 @@ import math import random import sys + from datetime import datetime, timedelta import urllib3 @@ -42,7 +43,6 @@ def jitter(loop_count, min_wait_in_ms): class OAuth2Client: - def __init__(self, credentials: Credentials, configuration=None): self._credentials = credentials self._access_token = None @@ -125,7 +125,7 @@ async def _obtain_token(self, client): if 200 <= raw_response.status <= 299: try: api_response = json.loads(raw_response.data) - except: + except Exception: raise AuthenticationError(http_resp=raw_response) if api_response.get("expires_in") and api_response.get("access_token"): diff --git a/openfga_sdk/rest.py b/openfga_sdk/rest.py index 3a29cc1..ae2cdbb 100644 --- a/openfga_sdk/rest.py +++ b/openfga_sdk/rest.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import io @@ -16,6 +16,7 @@ import re import ssl import urllib + from typing import Any, List, Optional, Tuple import aiohttp @@ -31,6 +32,7 @@ ValidationException, ) + logger = logging.getLogger(__name__) diff --git a/openfga_sdk/sync/__init__.py b/openfga_sdk/sync/__init__.py index da94389..ad7fb68 100644 --- a/openfga_sdk/sync/__init__.py +++ b/openfga_sdk/sync/__init__.py @@ -1,14 +1,20 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.sync.api_client import ApiClient from openfga_sdk.sync.client.client import OpenFgaClient + + +__all__ = [ + "ApiClient", + "OpenFgaClient", +] diff --git a/openfga_sdk/sync/api_client.py b/openfga_sdk/sync/api_client.py index fa63e3a..b9a6eef 100644 --- a/openfga_sdk/sync/api_client.py +++ b/openfga_sdk/sync/api_client.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import atexit @@ -18,11 +18,13 @@ import re import time import urllib + from multiprocessing.pool import ThreadPool from dateutil.parser import parse import openfga_sdk.models + from openfga_sdk.configuration import Configuration from openfga_sdk.exceptions import ( ApiException, @@ -35,6 +37,7 @@ from openfga_sdk.telemetry import Telemetry from openfga_sdk.telemetry.attributes import TelemetryAttribute, TelemetryAttributes + DEFAULT_USER_AGENT = "openfga-sdk python/0.9.1" @@ -167,7 +170,6 @@ def __call_api( _telemetry_attributes: dict[TelemetryAttribute, str | int] = None, _streaming: bool = False, ): - self.configuration.is_valid() config = self.configuration start = float(time.time()) @@ -477,14 +479,17 @@ def __deserialize(self, data, klass): if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) - elif klass == object: + + if klass is object: return self.__deserialize_object(data) - elif klass == datetime.date: + + if klass is datetime.date: return self.__deserialize_date(data) - elif klass == datetime.datetime: + + if klass is datetime.datetime: return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) + + return self.__deserialize_model(data, klass) def call_api( self, diff --git a/openfga_sdk/sync/client/__init__.py b/openfga_sdk/sync/client/__init__.py index 8c82238..97b78a4 100644 --- a/openfga_sdk/sync/client/__init__.py +++ b/openfga_sdk/sync/client/__init__.py @@ -1,11 +1,11 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ diff --git a/openfga_sdk/sync/client/client.py b/openfga_sdk/sync/client/client.py index 02c94cf..cd19509 100644 --- a/openfga_sdk/sync/client/client.py +++ b/openfga_sdk/sync/client/client.py @@ -1,16 +1,17 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import uuid + from concurrent.futures import ThreadPoolExecutor from openfga_sdk.client.configuration import ClientConfiguration @@ -75,6 +76,7 @@ from openfga_sdk.sync.open_fga_api import OpenFgaApi from openfga_sdk.validation import is_well_formed_ulid_string + CLIENT_METHOD_HEADER = "X-OpenFGA-Client-Method" CLIENT_BULK_REQUEST_ID_HEADER = "X-OpenFGA-Client-Bulk-Request-Id" diff --git a/openfga_sdk/sync/oauth2.py b/openfga_sdk/sync/oauth2.py index 5b10cda..b61e9bd 100644 --- a/openfga_sdk/sync/oauth2.py +++ b/openfga_sdk/sync/oauth2.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import json @@ -15,6 +15,7 @@ import random import sys import time + from datetime import datetime, timedelta import urllib3 @@ -42,7 +43,6 @@ def jitter(loop_count, min_wait_in_ms): class OAuth2Client: - def __init__(self, credentials: Credentials, configuration=None): self._credentials = credentials self._access_token = None @@ -125,7 +125,7 @@ def _obtain_token(self, client): if 200 <= raw_response.status <= 299: try: api_response = json.loads(raw_response.data) - except: + except Exception: raise AuthenticationError(http_resp=raw_response) if api_response.get("expires_in") and api_response.get("access_token"): diff --git a/openfga_sdk/sync/open_fga_api.py b/openfga_sdk/sync/open_fga_api.py index a34ef4b..6305591 100644 --- a/openfga_sdk/sync/open_fga_api.py +++ b/openfga_sdk/sync/open_fga_api.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from openfga_sdk.exceptions import ApiValueError, FgaValidationException @@ -309,7 +309,7 @@ def check_with_http_info(self, body, **kwargs): for key, val in local_var_params["kwargs"].items(): if key not in all_params: raise FgaValidationException( - "Got an unexpected keyword argument '%s'" " to method check" % key + "Got an unexpected keyword argument '%s' to method check" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -807,7 +807,7 @@ def expand_with_http_info(self, body, **kwargs): for key, val in local_var_params["kwargs"].items(): if key not in all_params: raise FgaValidationException( - "Got an unexpected keyword argument '%s'" " to method expand" % key + "Got an unexpected keyword argument '%s' to method expand" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -984,8 +984,7 @@ def get_store_with_http_info(self, **kwargs): for key, val in local_var_params["kwargs"].items(): if key not in all_params: raise FgaValidationException( - "Got an unexpected keyword argument '%s'" - " to method get_store" % key + "Got an unexpected keyword argument '%s' to method get_store" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -1494,8 +1493,7 @@ def list_users_with_http_info(self, body, **kwargs): for key, val in local_var_params["kwargs"].items(): if key not in all_params: raise FgaValidationException( - "Got an unexpected keyword argument '%s'" - " to method list_users" % key + "Got an unexpected keyword argument '%s' to method list_users" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -1676,7 +1674,7 @@ def read_with_http_info(self, body, **kwargs): for key, val in local_var_params["kwargs"].items(): if key not in all_params: raise FgaValidationException( - "Got an unexpected keyword argument '%s'" " to method read" % key + "Got an unexpected keyword argument '%s' to method read" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -2747,7 +2745,7 @@ def write_with_http_info(self, body, **kwargs): for key, val in local_var_params["kwargs"].items(): if key not in all_params: raise FgaValidationException( - "Got an unexpected keyword argument '%s'" " to method write" % key + "Got an unexpected keyword argument '%s' to method write" % key ) local_var_params[key] = val del local_var_params["kwargs"] diff --git a/openfga_sdk/sync/rest.py b/openfga_sdk/sync/rest.py index 8e2853a..2b66a70 100644 --- a/openfga_sdk/sync/rest.py +++ b/openfga_sdk/sync/rest.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import io @@ -16,6 +16,7 @@ import re import ssl import urllib + from typing import Any, List, Optional, Tuple import urllib3 @@ -31,6 +32,7 @@ ValidationException, ) + logger = logging.getLogger(__name__) diff --git a/openfga_sdk/telemetry/__init__.py b/openfga_sdk/telemetry/__init__.py index 5da1611..e00b0db 100644 --- a/openfga_sdk/telemetry/__init__.py +++ b/openfga_sdk/telemetry/__init__.py @@ -1,3 +1,15 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + from openfga_sdk.telemetry.attributes import TelemetryAttribute, TelemetryAttributes from openfga_sdk.telemetry.configuration import ( TelemetryConfiguration, @@ -9,3 +21,18 @@ from openfga_sdk.telemetry.histograms import TelemetryHistogram, TelemetryHistograms from openfga_sdk.telemetry.metrics import TelemetryMetrics from openfga_sdk.telemetry.telemetry import Telemetry + + +__all__ = [ + "Telemetry", + "TelemetryAttribute", + "TelemetryAttributes", + "TelemetryConfiguration", + "TelemetryConfigurations", + "TelemetryConfigurationType", + "TelemetryMetricConfiguration", + "TelemetryMetricsConfiguration", + "TelemetryHistogram", + "TelemetryHistograms", + "TelemetryMetrics", +] diff --git a/openfga_sdk/telemetry/attributes.py b/openfga_sdk/telemetry/attributes.py index 81360eb..9278ccf 100644 --- a/openfga_sdk/telemetry/attributes.py +++ b/openfga_sdk/telemetry/attributes.py @@ -1,5 +1,18 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + import time import urllib + from typing import Any, NamedTuple from aiohttp import ClientResponse @@ -255,9 +268,11 @@ def fromRequest( @staticmethod def fromResponse( - response: ( - HTTPResponse | RESTResponse | ClientResponse | ApiException | None - ) = None, + response: HTTPResponse + | RESTResponse + | ClientResponse + | ApiException + | None = None, credentials: Credentials | None = None, attributes: dict[TelemetryAttribute, str | int] | None = None, ) -> dict[TelemetryAttribute, str | int]: diff --git a/openfga_sdk/telemetry/configuration.py b/openfga_sdk/telemetry/configuration.py index 3ba7701..beaba28 100644 --- a/openfga_sdk/telemetry/configuration.py +++ b/openfga_sdk/telemetry/configuration.py @@ -1,3 +1,15 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + from typing import NamedTuple from openfga_sdk.telemetry.attributes import TelemetryAttribute, TelemetryAttributes @@ -632,13 +644,10 @@ class TelemetryMetricsConfiguration: def __init__( self, - config: ( - dict[ - TelemetryHistogram | TelemetryCounter, - TelemetryMetricConfiguration | None, - ] - | None - ) = None, + config: dict[ + TelemetryHistogram | TelemetryCounter, TelemetryMetricConfiguration | None + ] + | None = None, fga_client_credentials_request: TelemetryMetricConfiguration | None = None, fga_client_request_duration: TelemetryMetricConfiguration | None = None, fga_client_query_duration: TelemetryMetricConfiguration | None = None, @@ -778,13 +787,11 @@ def clear(self) -> None: def configure( self, - config: ( - dict[ - TelemetryHistogram | TelemetryCounter | str, - TelemetryMetricConfiguration | dict[TelemetryAttribute, bool] | None, - ] - | None - ) = None, + config: dict[ + TelemetryHistogram | TelemetryCounter | str, + TelemetryMetricConfiguration | dict[TelemetryAttribute, bool] | None, + ] + | None = None, clear: bool = False, ) -> None: """ @@ -903,9 +910,9 @@ def isValid(self, raise_exception: bool = False) -> bool: return self._valid @staticmethod - def getSdkDefaults() -> ( - dict[TelemetryHistogram | TelemetryCounter, TelemetryMetricConfiguration | None] - ): + def getSdkDefaults() -> dict[ + TelemetryHistogram | TelemetryCounter, TelemetryMetricConfiguration | None + ]: """ Get the default SDK configuration for telemetry metrics. @@ -1004,20 +1011,16 @@ def clear(self) -> None: def configure( self, - config: ( - dict[ - TelemetryConfigurationType | str, - TelemetryMetricsConfiguration - | dict[ - TelemetryHistogram | TelemetryCounter, - TelemetryMetricConfiguration - | dict[TelemetryAttribute, bool] - | None, - ] - | None, + config: dict[ + TelemetryConfigurationType | str, + TelemetryMetricsConfiguration + | dict[ + TelemetryHistogram | TelemetryCounter, + TelemetryMetricConfiguration | dict[TelemetryAttribute, bool] | None, ] - | None - ) = None, + | None, + ] + | None = None, clear: bool = False, ) -> None: """ @@ -1126,9 +1129,9 @@ def isValid(self, raise_exception: bool = False) -> bool: return self._valid @staticmethod - def getSdkDefaults() -> ( - dict[TelemetryConfigurationType, TelemetryMetricsConfiguration | None] - ): + def getSdkDefaults() -> dict[ + TelemetryConfigurationType, TelemetryMetricsConfiguration | None + ]: """ Get the default SDK configuration for telemetry. diff --git a/openfga_sdk/telemetry/counters.py b/openfga_sdk/telemetry/counters.py index 3e16ce4..01c9545 100644 --- a/openfga_sdk/telemetry/counters.py +++ b/openfga_sdk/telemetry/counters.py @@ -1,3 +1,15 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + from typing import NamedTuple diff --git a/openfga_sdk/telemetry/histograms.py b/openfga_sdk/telemetry/histograms.py index 482fd3a..8a5b3fb 100644 --- a/openfga_sdk/telemetry/histograms.py +++ b/openfga_sdk/telemetry/histograms.py @@ -1,3 +1,15 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + from typing import NamedTuple diff --git a/openfga_sdk/telemetry/metrics.py b/openfga_sdk/telemetry/metrics.py index 6c41380..63ed27c 100644 --- a/openfga_sdk/telemetry/metrics.py +++ b/openfga_sdk/telemetry/metrics.py @@ -1,3 +1,15 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + from opentelemetry.metrics import Counter, Histogram, Meter, get_meter from openfga_sdk.telemetry.attributes import ( diff --git a/openfga_sdk/telemetry/telemetry.py b/openfga_sdk/telemetry/telemetry.py index 7a23f55..7ed9e06 100644 --- a/openfga_sdk/telemetry/telemetry.py +++ b/openfga_sdk/telemetry/telemetry.py @@ -1,3 +1,15 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + from openfga_sdk.telemetry.metrics import TelemetryMetrics diff --git a/openfga_sdk/telemetry/utilities.py b/openfga_sdk/telemetry/utilities.py index 9203328..6edbcf6 100644 --- a/openfga_sdk/telemetry/utilities.py +++ b/openfga_sdk/telemetry/utilities.py @@ -1,3 +1,16 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + + def doesInstanceHaveCallable(instance: object, callableName: str) -> bool: instanceCallable = getattr(instance, callableName, None) diff --git a/openfga_sdk/validation.py b/openfga_sdk/validation.py index 00278d9..5a04713 100644 --- a/openfga_sdk/validation.py +++ b/openfga_sdk/validation.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import re diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..52f7738 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,76 @@ +[tool.ruff] +exclude = [ + ".bzr", + ".direnv", + ".eggs", + ".git", + ".git-rewrite", + ".hg", + ".ipynb_checkpoints", + ".mypy_cache", + ".nox", + ".pants.d", + ".pyenv", + ".pytest_cache", + ".pytype", + ".ruff_cache", + ".svn", + ".tox", + ".venv", + ".vscode", + "__pypackages__", + "_build", + "buck-out", + "build", + "dist", + "node_modules", + "site-packages", + "venv", +] + +line-length = 88 +indent-width = 4 + +target-version = "py310" + +[tool.ruff.lint] +extend-select = [ + #"B", # flake8-bugbear + #"C4", # flake8-comprehensions + #"C9", # mccabe + "I", # isort + #"PGH", # pygrep-hooks + #"RUF", # ruff + #"UP", # pyupgrade + #"W", # pycodestyle + #"YTT", # flake8-2020 + #"TRY", # tryceratops + #"EM", # flake8-errmsg +] +ignore = [] + +fixable = ["ALL"] +unfixable = [] + +dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" + +[tool.ruff.lint.isort] +lines-between-types = 1 +lines-after-imports = 2 + +[tool.ruff.format] +quote-style = "double" +indent-style = "space" +skip-magic-trailing-comma = false +line-ending = "auto" + +[tool.pytest.ini_options] +testpaths = [ + "test", + "integration", +] + +addopts = "--cov=openfga_sdk --cov-report term-missing --cov-report xml --cov-report html" + +asyncio_mode = "strict" +asyncio_default_fixture_loop_scope = "function" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 719e295..0000000 --- a/setup.cfg +++ /dev/null @@ -1,20 +0,0 @@ -[flake8] -ignore=F401,E203,E402,E501,E722,W291,W503 -exclude=.pytest_cache,build,docs,example,test -max-line-length=88 -extend-select = B950 -extend-ignore = E203,E501,E701 - -[isort] -profile=black -multi_line_output = 3 -include_trailing_comma = True -force_grid_wrap = 0 -use_parentheses = True -ensure_newline_before_comments = True -line_length = 88 -split_on_trailing_comma = True - -[tool:pytest] -testpaths=test -addopts=--cov=openfga_sdk --cov-report term-missing --cov-report xml --cov-report html diff --git a/setup.py b/setup.py index 76dcf66..e67f4cb 100644 --- a/setup.py +++ b/setup.py @@ -1,20 +1,22 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import pathlib import pkg_resources + from setuptools import find_packages, setup + NAME = "openfga-sdk" VERSION = "0.9.1" REQUIRES = [] diff --git a/test-requirements.txt b/test-requirements.txt index aae4461..2757011 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,11 +1,7 @@ -r requirements.txt -mock >= 5.1.0, < 6 -autoflake==2.3.1 -black==24.10.0 -flake8 >= 7.0.0, < 8 griffe >= 0.41.2, < 2 -isort==5.13.2 -pytest-cov >= 5, < 7 -pyupgrade==3.19.1 +mock >= 5.1.0, < 6 pytest-asyncio >= 0.25, < 1 +pytest-cov >= 5, < 7 +ruff >= 0.9, < 1 diff --git a/test/__init__.py b/test/__init__.py index e69de29..97b78a4 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -0,0 +1,11 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" diff --git a/test/api/__init__.py b/test/api/__init__.py index e69de29..97b78a4 100644 --- a/test/api/__init__.py +++ b/test/api/__init__.py @@ -0,0 +1,11 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" diff --git a/test/api/open_fga_api_test.py b/test/api/open_fga_api_test.py index a593d96..dac5f7a 100644 --- a/test/api/open_fga_api_test.py +++ b/test/api/open_fga_api_test.py @@ -1,16 +1,17 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import unittest + from datetime import datetime from unittest import IsolatedAsyncioTestCase from unittest.mock import ANY, patch @@ -18,6 +19,7 @@ import urllib3 import openfga_sdk + from openfga_sdk import rest from openfga_sdk.api import open_fga_api from openfga_sdk.credentials import CredentialConfiguration, Credentials @@ -90,6 +92,7 @@ from openfga_sdk.models.write_request_deletes import WriteRequestDeletes from openfga_sdk.models.write_request_writes import WriteRequestWrites + store_id = "01H0H015178Y2V4CX10C2KGHF4" request_id = "x1y2z3" @@ -1501,7 +1504,7 @@ async def test_501_error_retry(self, mock_request): user="user:81684243-9356-4421-8fbf-a4f8d36aa31b", ), ) - with self.assertRaises(ServiceException) as api_exception: + with self.assertRaises(ServiceException): await api_instance.check( body=body, ) diff --git a/test/client/__init__.py b/test/client/__init__.py index e69de29..97b78a4 100644 --- a/test/client/__init__.py +++ b/test/client/__init__.py @@ -0,0 +1,11 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" diff --git a/test/client/client_test.py b/test/client/client_test.py index d4c2e30..959accb 100644 --- a/test/client/client_test.py +++ b/test/client/client_test.py @@ -1,16 +1,17 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import uuid + from datetime import datetime from unittest import IsolatedAsyncioTestCase from unittest.mock import ANY, patch @@ -86,6 +87,7 @@ WriteAuthorizationModelResponse, ) + store_id = "01YCP46JKYM8FJCQ37NMBYHE5X" request_id = "x1y2z3" @@ -323,7 +325,6 @@ async def test_read_authorization_models(self, mock_request): configuration.store_id = store_id # Enter a context with an instance of the API client async with OpenFgaClient(configuration) as api_client: - # Return a particular version of an authorization model api_response = await api_client.read_authorization_models(options={}) self.assertIsInstance(api_response, ReadAuthorizationModelsResponse) @@ -494,7 +495,6 @@ async def test_read_authorization_model(self, mock_request): configuration.store_id = store_id # Enter a context with an instance of the API client async with OpenFgaClient(configuration) as api_client: - # Return a particular version of an authorization model api_response = await api_client.read_authorization_model( options={"authorization_model_id": "01G5JAVJ41T49E9TT3SKVS7X1J"} @@ -585,7 +585,6 @@ async def test_read_latest_authorization_model(self, mock_request): configuration.store_id = store_id # Enter a context with an instance of the API client async with OpenFgaClient(configuration) as api_client: - # Return a particular version of an authorization model api_response = await api_client.read_latest_authorization_model(options={}) self.assertIsInstance(api_response, ReadAuthorizationModelResponse) @@ -645,7 +644,6 @@ async def test_read_latest_authorization_model_with_no_models(self, mock_request configuration.store_id = store_id # Enter a context with an instance of the API client async with OpenFgaClient(configuration) as api_client: - # Return a particular version of an authorization model api_response = await api_client.read_latest_authorization_model(options={}) self.assertIsInstance(api_response, ReadAuthorizationModelResponse) @@ -688,7 +686,6 @@ async def test_read_changes(self, mock_request): configuration.store_id = store_id # Enter a context with an instance of the API client async with OpenFgaClient(configuration) as api_client: - # Return a particular version of an authorization model api_response = await api_client.read_changes( ClientReadChangesRequest("document", "2022-01-01T00:00:00+00:00"), @@ -918,7 +915,6 @@ async def test_write(self, mock_request): configuration = self.configuration configuration.store_id = store_id async with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( writes=[ ClientTuple( @@ -984,7 +980,6 @@ async def test_delete(self, mock_request): configuration = self.configuration configuration.store_id = store_id async with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( deletes=[ ClientTuple( @@ -1033,7 +1028,6 @@ async def test_write_batch(self, mock_request): configuration = self.configuration configuration.store_id = store_id async with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( writes=[ ClientTuple( @@ -1176,7 +1170,6 @@ async def test_write_batch_min_parallel(self, mock_request): configuration = self.configuration configuration.store_id = store_id async with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( writes=[ ClientTuple( @@ -1318,7 +1311,6 @@ async def test_write_batch_larger_chunk(self, mock_request): configuration = self.configuration configuration.store_id = store_id async with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( writes=[ ClientTuple( @@ -1452,7 +1444,6 @@ async def test_write_batch_failed(self, mock_request): configuration = self.configuration configuration.store_id = store_id async with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( writes=[ ClientTuple( @@ -1600,7 +1591,6 @@ async def test_delete_batch(self, mock_request): configuration = self.configuration configuration.store_id = store_id async with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( deletes=[ ClientTuple( @@ -1654,7 +1644,6 @@ async def test_write_tuples(self, mock_request): configuration = self.configuration configuration.store_id = store_id async with OpenFgaClient(configuration) as api_client: - await api_client.write_tuples( [ ClientTuple( @@ -1718,7 +1707,6 @@ async def test_delete_tuples(self, mock_request): configuration = self.configuration configuration.store_id = store_id async with OpenFgaClient(configuration) as api_client: - await api_client.delete_tuples( [ ClientTuple( diff --git a/test/configuration_test.py b/test/configuration_test.py index 79ec89d..5045506 100644 --- a/test/configuration_test.py +++ b/test/configuration_test.py @@ -1,16 +1,17 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import copy + from unittest.mock import Mock import pytest @@ -282,14 +283,6 @@ def test_configuration_get_host_from_settings(self, configuration, servers): ) def test_configuration_get_host_from_settings_invalid_value(self, configuration): - servers = [ - { - "url": "https://{region}.fga.example", - "description": "Example", - "variables": {"region": {"default_value": "us"}}, - } - ] - variables = {"region": "invalid"} with pytest.raises(ValueError): configuration.get_host_from_settings(999, variables={"var": "value"}) diff --git a/test/credentials_test.py b/test/credentials_test.py index 9f3915d..238608f 100644 --- a/test/credentials_test.py +++ b/test/credentials_test.py @@ -1,18 +1,19 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from unittest import IsolatedAsyncioTestCase import openfga_sdk + from openfga_sdk.credentials import CredentialConfiguration, Credentials from openfga_sdk.exceptions import ApiValueError @@ -209,7 +210,9 @@ def test_valid_issuer_http(self): def test_invalid_issuer_no_scheme(self): # Test an issuer URL without a scheme - self.configuration.api_issuer = "https://issuer.fga.example:8080/some_endpoint " + self.configuration.api_issuer = ( + "https://issuer.fga.example:8080/some_endpoint " + ) result = self.credentials._parse_issuer(self.configuration.api_issuer) self.assertEqual(result, "https://issuer.fga.example:8080/some_endpoint") diff --git a/test/oauth2_test.py b/test/oauth2_test.py index b90265a..24b1826 100644 --- a/test/oauth2_test.py +++ b/test/oauth2_test.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from datetime import datetime, timedelta diff --git a/test/rest_test.py b/test/rest_test.py index 3257cb7..7edea27 100644 --- a/test/rest_test.py +++ b/test/rest_test.py @@ -1,16 +1,17 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import json + from unittest.mock import AsyncMock, MagicMock import pytest diff --git a/test/sync/__init__.py b/test/sync/__init__.py index e69de29..97b78a4 100644 --- a/test/sync/__init__.py +++ b/test/sync/__init__.py @@ -0,0 +1,11 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" diff --git a/test/sync/client/__init__.py b/test/sync/client/__init__.py index e69de29..97b78a4 100644 --- a/test/sync/client/__init__.py +++ b/test/sync/client/__init__.py @@ -0,0 +1,11 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" diff --git a/test/sync/client/client_test.py b/test/sync/client/client_test.py index 3435ded..124fbdb 100644 --- a/test/sync/client/client_test.py +++ b/test/sync/client/client_test.py @@ -1,16 +1,17 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import uuid + from datetime import datetime from unittest import IsolatedAsyncioTestCase from unittest.mock import ANY, patch @@ -85,6 +86,7 @@ from openfga_sdk.sync import rest from openfga_sdk.sync.client.client import OpenFgaClient + store_id = "01YCP46JKYM8FJCQ37NMBYHE5X" request_id = "x1y2z3" @@ -322,7 +324,6 @@ def test_read_authorization_models(self, mock_request): configuration.store_id = store_id # Enter a context with an instance of the API client with OpenFgaClient(configuration) as api_client: - # Return a particular version of an authorization model api_response = api_client.read_authorization_models(options={}) self.assertIsInstance(api_response, ReadAuthorizationModelsResponse) @@ -493,7 +494,6 @@ def test_read_authorization_model(self, mock_request): configuration.store_id = store_id # Enter a context with an instance of the API client with OpenFgaClient(configuration) as api_client: - # Return a particular version of an authorization model api_response = api_client.read_authorization_model( options={"authorization_model_id": "01G5JAVJ41T49E9TT3SKVS7X1J"} @@ -584,7 +584,6 @@ def test_read_latest_authorization_model(self, mock_request): configuration.store_id = store_id # Enter a context with an instance of the API client with OpenFgaClient(configuration) as api_client: - # Return a particular version of an authorization model api_response = api_client.read_latest_authorization_model(options={}) self.assertIsInstance(api_response, ReadAuthorizationModelResponse) @@ -644,7 +643,6 @@ def test_read_latest_authorization_model_with_no_models(self, mock_request): configuration.store_id = store_id # Enter a context with an instance of the API client with OpenFgaClient(configuration) as api_client: - # Return a particular version of an authorization model api_response = api_client.read_latest_authorization_model(options={}) self.assertIsInstance(api_response, ReadAuthorizationModelResponse) @@ -687,7 +685,6 @@ def test_read_changes(self, mock_request): configuration.store_id = store_id # Enter a context with an instance of the API client with OpenFgaClient(configuration) as api_client: - # Return a particular version of an authorization model api_response = api_client.read_changes( ClientReadChangesRequest("document", "2022-01-01T00:00:00+00:00"), @@ -916,7 +913,6 @@ def test_write(self, mock_request): configuration = self.configuration configuration.store_id = store_id with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( writes=[ ClientTuple( @@ -982,7 +978,6 @@ def test_delete(self, mock_request): configuration = self.configuration configuration.store_id = store_id with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( deletes=[ ClientTuple( @@ -1031,7 +1026,6 @@ def test_write_batch(self, mock_request): configuration = self.configuration configuration.store_id = store_id with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( writes=[ ClientTuple( @@ -1174,7 +1168,6 @@ def test_write_batch_min_parallel(self, mock_request): configuration = self.configuration configuration.store_id = store_id with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( writes=[ ClientTuple( @@ -1317,7 +1310,6 @@ def test_write_batch_larger_chunk(self, mock_request): configuration = self.configuration configuration.store_id = store_id with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( writes=[ ClientTuple( @@ -1451,7 +1443,6 @@ def test_write_batch_failed(self, mock_request): configuration = self.configuration configuration.store_id = store_id with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( writes=[ ClientTuple( @@ -1599,7 +1590,6 @@ def test_delete_batch(self, mock_request): configuration = self.configuration configuration.store_id = store_id with OpenFgaClient(configuration) as api_client: - body = ClientWriteRequest( deletes=[ ClientTuple( @@ -1653,7 +1643,6 @@ def test_write_tuples(self, mock_request): configuration = self.configuration configuration.store_id = store_id with OpenFgaClient(configuration) as api_client: - api_client.write_tuples( [ ClientTuple( @@ -1717,7 +1706,6 @@ def test_delete_tuples(self, mock_request): configuration = self.configuration configuration.store_id = store_id with OpenFgaClient(configuration) as api_client: - api_client.delete_tuples( [ ClientTuple( diff --git a/test/sync/oauth2_test.py b/test/sync/oauth2_test.py index 01bdb7b..bfaa77d 100644 --- a/test/sync/oauth2_test.py +++ b/test/sync/oauth2_test.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ from datetime import datetime, timedelta diff --git a/test/sync/open_fga_api_test.py b/test/sync/open_fga_api_test.py index 4b1be94..fc1fc87 100644 --- a/test/sync/open_fga_api_test.py +++ b/test/sync/open_fga_api_test.py @@ -1,16 +1,17 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import unittest + from datetime import datetime from unittest import IsolatedAsyncioTestCase from unittest.mock import ANY, patch @@ -18,6 +19,7 @@ import urllib3 import openfga_sdk.sync + from openfga_sdk.configuration import Configuration from openfga_sdk.credentials import CredentialConfiguration, Credentials from openfga_sdk.exceptions import ( @@ -91,6 +93,7 @@ from openfga_sdk.sync import open_fga_api, rest from openfga_sdk.sync.api_client import ApiClient + store_id = "01H0H015178Y2V4CX10C2KGHF4" request_id = "x1y2z3" @@ -1428,7 +1431,7 @@ async def test_500_error(self, mock_request): self.assertEqual(mock_request.call_count, 1) @patch.object(rest.RESTClientObject, "request") - async def test_500_error(self, mock_request): + async def test_500_error_retry(self, mock_request): """ Test to ensure 5xx retries are handled properly """ @@ -1501,7 +1504,7 @@ async def test_501_error_retry(self, mock_request): user="user:81684243-9356-4421-8fbf-a4f8d36aa31b", ), ) - with self.assertRaises(ServiceException) as api_exception: + with self.assertRaises(ServiceException): api_instance.check( body=body, ) diff --git a/test/sync/rest_test.py b/test/sync/rest_test.py index b3781f4..fa40fbc 100644 --- a/test/sync/rest_test.py +++ b/test/sync/rest_test.py @@ -1,16 +1,17 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import json + from unittest.mock import MagicMock import pytest diff --git a/test/telemetry/attributes_test.py b/test/telemetry/attributes_test.py index 14b854b..aeb3004 100644 --- a/test/telemetry/attributes_test.py +++ b/test/telemetry/attributes_test.py @@ -1,7 +1,21 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + import time + from unittest.mock import MagicMock import pytest + from urllib3 import HTTPResponse from openfga_sdk.credentials import CredentialConfiguration, Credentials diff --git a/test/telemetry/configuration_test.py b/test/telemetry/configuration_test.py index 7b3761a..155cd6c 100644 --- a/test/telemetry/configuration_test.py +++ b/test/telemetry/configuration_test.py @@ -1,3 +1,15 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + from openfga_sdk.telemetry.attributes import TelemetryAttributes from openfga_sdk.telemetry.configuration import ( TelemetryConfiguration, diff --git a/test/telemetry/counters_test.py b/test/telemetry/counters_test.py index ae5372e..9ee9a20 100644 --- a/test/telemetry/counters_test.py +++ b/test/telemetry/counters_test.py @@ -1,3 +1,15 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + from openfga_sdk.telemetry.counters import TelemetryCounter, TelemetryCounters diff --git a/test/telemetry/histograms_test.py b/test/telemetry/histograms_test.py index 1bcd05a..7323293 100644 --- a/test/telemetry/histograms_test.py +++ b/test/telemetry/histograms_test.py @@ -1,3 +1,15 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + from openfga_sdk.telemetry.histograms import TelemetryHistogram, TelemetryHistograms diff --git a/test/telemetry/metrics_test.py b/test/telemetry/metrics_test.py index a556185..a20677a 100644 --- a/test/telemetry/metrics_test.py +++ b/test/telemetry/metrics_test.py @@ -1,9 +1,21 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + from unittest.mock import MagicMock, patch import pytest + from opentelemetry.metrics import Counter, Histogram, Meter -from openfga_sdk.telemetry.attributes import TelemetryAttributes from openfga_sdk.telemetry.counters import TelemetryCounters from openfga_sdk.telemetry.histograms import TelemetryHistograms from openfga_sdk.telemetry.metrics import TelemetryMetrics @@ -39,11 +51,6 @@ def test_counter_creation(mock_get_meter): telemetry = TelemetryMetrics() - attributes = { - TelemetryAttributes.fga_client_request_model_id.name: "model_123", - "custom_attribute": "custom_value", - } - counter = telemetry.counter(TelemetryCounters.fga_client_credentials_request) assert counter == mock_counter @@ -64,11 +71,6 @@ def test_histogram_creation(mock_get_meter): telemetry = TelemetryMetrics() - attributes = { - TelemetryAttributes.fga_client_request_model_id.name: "model_123", - "custom_attribute": "custom_value", - } - histogram = telemetry.histogram(TelemetryHistograms.fga_client_request_duration) assert histogram == mock_histogram diff --git a/test/telemetry/telemetry_test.py b/test/telemetry/telemetry_test.py index a8424ed..7da388d 100644 --- a/test/telemetry/telemetry_test.py +++ b/test/telemetry/telemetry_test.py @@ -1,3 +1,15 @@ +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + from unittest.mock import patch from openfga_sdk.telemetry.metrics import ( diff --git a/test/telemetry/utilities_test.py b/test/telemetry/utilities_test.py index 80de9d2..5af418b 100644 --- a/test/telemetry/utilities_test.py +++ b/test/telemetry/utilities_test.py @@ -1,4 +1,16 @@ -from mock import MagicMock +""" +Python SDK for OpenFGA + +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) + +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +""" + +from unittest.mock import MagicMock from openfga_sdk.telemetry.utilities import doesInstanceHaveCallable diff --git a/test/validation_test.py b/test/validation_test.py index 7837dc9..d27be9a 100644 --- a/test/validation_test.py +++ b/test/validation_test.py @@ -1,13 +1,13 @@ """ - Python SDK for OpenFGA +Python SDK for OpenFGA - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) +API version: 1.x +Website: https://openfga.dev +Documentation: https://openfga.dev/docs +Support: https://openfga.dev/community +License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ import unittest