Skip to content

Commit 9c024e1

Browse files
committed
Support APIClient use custom_user_agent V1.12.5
1 parent 089b59a commit 9c024e1

9 files changed

+4
-3
lines changed

dist/tikhub-1.12.0-py3-none-any.whl

-67 KB
Binary file not shown.

dist/tikhub-1.12.0.tar.gz

-45.4 KB
Binary file not shown.

dist/tikhub-1.12.1.tar.gz

-45.6 KB
Binary file not shown.

dist/tikhub-1.12.2-py3-none-any.whl

-67.7 KB
Binary file not shown.

dist/tikhub-1.12.2.tar.gz

-46 KB
Binary file not shown.

dist/tikhub-1.12.5.tar.gz

46 KB
Binary file not shown.

tikhub/client/client.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def __init__(self,
5757
max_retries: int = 3,
5858
max_connections: int = 50,
5959
timeout: int = 60,
60-
max_tasks: int = 50
60+
max_tasks: int = 50,
61+
custom_user_agent: str = None,
6162
):
6263
# Base URL
6364
self.base_url = base_url
@@ -74,7 +75,7 @@ def __init__(self,
7475
self.client = APIClient(
7576
base_url=self.base_url,
7677
client_headers={
77-
"User-Agent": f"TikHub-API-SDK-Python/{self.version}",
78+
"User-Agent": f"TikHub-API-SDK-Python/{self.version}" if not custom_user_agent else custom_user_agent,
7879
"X-SDK-Version": f"{self.version}",
7980
"Authorization": f"Bearer {self.api_key}"
8081
},

tikhub/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# tikhub/version.py
2-
version = "1.12.4"
2+
version = "1.12.5"

0 commit comments

Comments
 (0)