Skip to content

Commit c4c7310

Browse files
author
clickingbuttons
committed
add user agent string (#137)
* add user agent string * lint
1 parent a9e6ab7 commit c4c7310

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

polygon/rest/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ def __init__(
3131
# https://urllib3.readthedocs.io/en/stable/reference/urllib3.poolmanager.html
3232
# https://urllib3.readthedocs.io/en/stable/reference/urllib3.connectionpool.html#urllib3.HTTPConnectionPool
3333
self.client = urllib3.PoolManager(
34-
num_pools=num_pools, headers={"Authorization": "Bearer " + self.API_KEY}
34+
num_pools=num_pools,
35+
headers={
36+
"Authorization": "Bearer " + self.API_KEY,
37+
"User-Agent": "Python client",
38+
},
3539
)
3640
self.timeout = urllib3.Timeout(connect=connect_timeout, read=read_timeout)
3741
self.retries = retries

0 commit comments

Comments
 (0)