diff --git a/example/example1/example1.py b/example/example1/example1.py index 002f28e..9964835 100644 --- a/example/example1/example1.py +++ b/example/example1/example1.py @@ -3,6 +3,8 @@ import sys import uuid +from dotenv import load_dotenv + sdk_path = os.path.realpath(os.path.join(os.path.abspath(__file__), "..", "..", "..")) sys.path.insert(0, sdk_path) @@ -42,6 +44,8 @@ async def main(): + load_dotenv() + credentials = Credentials() if os.getenv("FGA_CLIENT_ID") is not None: credentials = Credentials( diff --git a/example/example1/requirements.txt b/example/example1/requirements.txt index e2a9936..ba25f4e 100644 --- a/example/example1/requirements.txt +++ b/example/example1/requirements.txt @@ -8,3 +8,4 @@ openfga-sdk >= 0.9.0 python-dateutil >= 2.8.2 urllib3 >= 2.1.0 yarl >= 1.9.4 +python-dotenv >= 1, <2 diff --git a/openfga_sdk/client/client.py b/openfga_sdk/client/client.py index a8e042e..b121629 100644 --- a/openfga_sdk/client/client.py +++ b/openfga_sdk/client/client.py @@ -13,7 +13,6 @@ import asyncio import uuid - from openfga_sdk.api.open_fga_api import OpenFgaApi from openfga_sdk.api_client import ApiClient from openfga_sdk.client.configuration import ClientConfiguration