diff --git a/config/clients/python/template/client/client.mustache b/config/clients/python/template/client/client.mustache index a82ab7df..ebe8d333 100644 --- a/config/clients/python/template/client/client.mustache +++ b/config/clients/python/template/client/client.mustache @@ -1,6 +1,15 @@ # coding: utf-8 {{>partial_header}} +{{#asyncio}} +import asyncio +{{/asyncio}} +{{^asyncio}} +import time +{{/asyncio}} +import uuid +from typing import List + from {{packageName}}.api_client import ApiClient from {{packageName}}.api.open_fga_api import OpenFgaApi from {{packageName}}.client.configuration import ClientConfiguration @@ -31,15 +40,6 @@ from {{packageName}}.models.write_authorization_model_request import WriteAuthor from {{packageName}}.models.write_request import WriteRequest from {{packageName}}.validation import is_well_formed_ulid_string -{{#asyncio}} -import asyncio -{{/asyncio}} -{{^asyncio}} -import time -{{/asyncio}} -import uuid -from typing import List - CLIENT_METHOD_HEADER = "X-OpenFGA-Client-Method" CLIENT_BULK_REQUEST_ID_HEADER = "X-OpenFGA-Client-Bulk-Request-Id" diff --git a/config/clients/python/template/configuration.mustache b/config/clients/python/template/configuration.mustache index 628e2e2e..23cdbdc7 100644 --- a/config/clients/python/template/configuration.mustache +++ b/config/clients/python/template/configuration.mustache @@ -8,11 +8,12 @@ import logging import multiprocessing {{/asyncio}} import sys -import urllib3 +from urllib.parse import urlparse +import urllib3 import six from six.moves import http_client as httplib -from urllib.parse import urlparse + from {{packageName}}.exceptions import FgaValidationException, ApiValueError from {{packageName}}.validation import is_well_formed_ulid_string