@@ -691,6 +691,8 @@ def download_file(
691691 """
692692 if not id :
693693 raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
694+ if not is_given (timeout ) and self ._client .timeout == DEFAULT_TIMEOUT :
695+ timeout = 600
694696 extra_headers = {"Accept" : "application/octet-stream" , ** (extra_headers or {})}
695697 return self ._post (
696698 f"/v1/devboxes/{ id } /download_file" ,
@@ -962,6 +964,8 @@ def read_file_contents(
962964 """
963965 if not id :
964966 raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
967+ if not is_given (timeout ) and self ._client .timeout == DEFAULT_TIMEOUT :
968+ timeout = 600
965969 extra_headers = {"Accept" : "text/plain" , ** (extra_headers or {})}
966970 return self ._post (
967971 f"/v1/devboxes/{ id } /read_file_contents" ,
@@ -1297,6 +1301,8 @@ def upload_file(
12971301 """
12981302 if not id :
12991303 raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
1304+ if not is_given (timeout ) and self ._client .timeout == DEFAULT_TIMEOUT :
1305+ timeout = 600
13001306 body = deepcopy_minimal (
13011307 {
13021308 "path" : path ,
@@ -1359,6 +1365,8 @@ def write_file_contents(
13591365 """
13601366 if not id :
13611367 raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
1368+ if not is_given (timeout ) and self ._client .timeout == DEFAULT_TIMEOUT :
1369+ timeout = 600
13621370 return self ._post (
13631371 f"/v1/devboxes/{ id } /write_file_contents" ,
13641372 body = maybe_transform (
@@ -1954,6 +1962,8 @@ async def download_file(
19541962 """
19551963 if not id :
19561964 raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
1965+ if not is_given (timeout ) and self ._client .timeout == DEFAULT_TIMEOUT :
1966+ timeout = 600
19571967 extra_headers = {"Accept" : "application/octet-stream" , ** (extra_headers or {})}
19581968 return await self ._post (
19591969 f"/v1/devboxes/{ id } /download_file" ,
@@ -2225,6 +2235,8 @@ async def read_file_contents(
22252235 """
22262236 if not id :
22272237 raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
2238+ if not is_given (timeout ) and self ._client .timeout == DEFAULT_TIMEOUT :
2239+ timeout = 600
22282240 extra_headers = {"Accept" : "text/plain" , ** (extra_headers or {})}
22292241 return await self ._post (
22302242 f"/v1/devboxes/{ id } /read_file_contents" ,
@@ -2560,6 +2572,8 @@ async def upload_file(
25602572 """
25612573 if not id :
25622574 raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
2575+ if not is_given (timeout ) and self ._client .timeout == DEFAULT_TIMEOUT :
2576+ timeout = 600
25632577 body = deepcopy_minimal (
25642578 {
25652579 "path" : path ,
@@ -2622,6 +2636,8 @@ async def write_file_contents(
26222636 """
26232637 if not id :
26242638 raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
2639+ if not is_given (timeout ) and self ._client .timeout == DEFAULT_TIMEOUT :
2640+ timeout = 600
26252641 return await self ._post (
26262642 f"/v1/devboxes/{ id } /write_file_contents" ,
26272643 body = await async_maybe_transform (
0 commit comments