Skip to content

Commit

Permalink
Merge pull request #40 from getmetal/task/sp/add-timeout-injected
Browse files Browse the repository at this point in the history
Bump timeout by default
  • Loading branch information
Czechh authored Sep 25, 2023
2 parents 2b999ec + d4b980b commit e5331a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "metal_sdk"
version = "2.1.3"
version = "2.1.4"
authors = [
{ name="Metal Technologies Inc", email="[email protected]" },
]
Expand Down
4 changes: 2 additions & 2 deletions src/metal_sdk/metal.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class Metal(httpx.Client):
client_id: str
index_id: str

def __init__(self, api_key, client_id, index_id=None, base_url=BASE_API):
super().__init__()
def __init__(self, api_key, client_id, index_id=None, base_url=BASE_API, timeout=30.0):
super().__init__(timeout=timeout)
self.api_key = api_key
self.client_id = client_id
self.index_id = index_id
Expand Down
4 changes: 2 additions & 2 deletions src/metal_sdk/metal_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class Metal(httpx.AsyncClient):
client_id: str
index_id: str

def __init__(self, api_key, client_id, index_id=None, base_url=BASE_API):
super().__init__()
def __init__(self, api_key, client_id, index_id=None, base_url=BASE_API, timeout=30.0):
super().__init__(timeout=timeout)
self.api_key = api_key
self.client_id = client_id
self.index_id = index_id
Expand Down

0 comments on commit e5331a0

Please sign in to comment.