openapi-httpx-client 0.4.0__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openapi-httpx-client-0.4.0 → openapi-httpx-client-0.4.1}/PKG-INFO +1 -1
- {openapi-httpx-client-0.4.0 → openapi-httpx-client-0.4.1}/openapi_httpx_client.egg-info/PKG-INFO +1 -1
- {openapi-httpx-client-0.4.0 → openapi-httpx-client-0.4.1}/openapi_httpx_client.egg-info/requires.txt +0 -1
- {openapi-httpx-client-0.4.0 → openapi-httpx-client-0.4.1}/openapiclient/client.py +8 -2
- {openapi-httpx-client-0.4.0 → openapi-httpx-client-0.4.1}/setup.py +1 -2
- {openapi-httpx-client-0.4.0 → openapi-httpx-client-0.4.1}/README.md +0 -0
- {openapi-httpx-client-0.4.0 → openapi-httpx-client-0.4.1}/openapi_httpx_client.egg-info/SOURCES.txt +0 -0
- {openapi-httpx-client-0.4.0 → openapi-httpx-client-0.4.1}/openapi_httpx_client.egg-info/dependency_links.txt +0 -0
- {openapi-httpx-client-0.4.0 → openapi-httpx-client-0.4.1}/openapi_httpx_client.egg-info/top_level.txt +0 -0
- {openapi-httpx-client-0.4.0 → openapi-httpx-client-0.4.1}/openapiclient/__init__.py +0 -0
- {openapi-httpx-client-0.4.0 → openapi-httpx-client-0.4.1}/setup.cfg +0 -0
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import httpx
|
|
2
2
|
import json
|
|
3
3
|
import os.path
|
|
4
|
-
from typing import Dict, List, Any, Optional, Union, Callable, Type
|
|
5
4
|
from urllib.parse import urljoin, urlparse
|
|
6
5
|
import yaml
|
|
7
|
-
from nanoid import generate as nanoid_generate
|
|
8
6
|
|
|
9
7
|
# 合并DynamicClientBase和BaseClient为一个基类
|
|
10
8
|
class BaseClient:
|
|
@@ -189,6 +187,10 @@ class OpenAPIClient:
|
|
|
189
187
|
|
|
190
188
|
async def _load_definition_async(self):
|
|
191
189
|
"""Load the OpenAPI definition asynchronously"""
|
|
190
|
+
# Check if definition is already loaded
|
|
191
|
+
if self.definition:
|
|
192
|
+
return
|
|
193
|
+
|
|
192
194
|
if isinstance(self.definition_source, dict):
|
|
193
195
|
self.definition = self.definition_source
|
|
194
196
|
return
|
|
@@ -209,6 +211,10 @@ class OpenAPIClient:
|
|
|
209
211
|
|
|
210
212
|
def _load_definition_sync(self):
|
|
211
213
|
"""Load the OpenAPI definition synchronously"""
|
|
214
|
+
# Check if definition is already loaded
|
|
215
|
+
if self.definition:
|
|
216
|
+
return
|
|
217
|
+
|
|
212
218
|
if isinstance(self.definition_source, dict):
|
|
213
219
|
self.definition = self.definition_source
|
|
214
220
|
return
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="openapi-httpx-client",
|
|
8
|
-
version="0.4.
|
|
8
|
+
version="0.4.1",
|
|
9
9
|
author="lloydzhou",
|
|
10
10
|
author_email="lloydzhou@qq.com",
|
|
11
11
|
description="A Python client for OpenAPI specifications using httpx",
|
|
@@ -16,7 +16,6 @@ setup(
|
|
|
16
16
|
install_requires=[
|
|
17
17
|
"httpx>=0.23.0",
|
|
18
18
|
"pyyaml>=6.0",
|
|
19
|
-
"nanoid>=0.2.1",
|
|
20
19
|
],
|
|
21
20
|
classifiers=[
|
|
22
21
|
"Programming Language :: Python :: 3",
|
|
File without changes
|
{openapi-httpx-client-0.4.0 → openapi-httpx-client-0.4.1}/openapi_httpx_client.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|