Skip to content

Commit a2bffcc

Browse files
release: 0.10.0 (#65)
* codegen metadata * codegen metadata * codegen metadata * codegen metadata * fix(parsing): ignore empty metadata * codegen metadata * feat(api): api update * fix(parsing): parse extra field types * codegen metadata * codegen metadata * codegen metadata * feat(api): api update * codegen metadata * feat(api): api update * feat(api): api update * chore(project): add settings file for vscode * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * feat(api): api update * codegen metadata * codegen metadata * codegen metadata * codegen metadata * feat(client): support file upload requests * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * feat(api): manual updates * release: 0.10.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 5f7060d commit a2bffcc

30 files changed

Lines changed: 385 additions & 71 deletions

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.prism.log
2-
.vscode
32
_dev
43

54
__pycache__

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.9.0"
2+
".": "0.10.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 13
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/reducto%2Freductoai-b775929356c319ad347567fedfce407fc56ba6936ff70f5d50229529ea2aaa60.yml
3-
openapi_spec_hash: 903caebc582826bf42c1243a58ea64c5
4-
config_hash: 02b50ce36a899f65286513e545c21e03
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/reducto%2Freductoai-36c65545beb58907757a5077ad5ef50c7282866754ab9a6c48536be8eb73f1e8.yml
3+
openapi_spec_hash: 024b82eafa291a1651da9ead4b39364f
4+
config_hash: f95bbe2d5c8069831c8b67b2c680bb98

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.analysis.importFormat": "relative",
3+
}

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Changelog
22

3+
## 0.10.0 (2025-08-05)
4+
5+
Full Changelog: [v0.9.0...v0.10.0](https://github.com/reductoai/reducto-python-sdk/compare/v0.9.0...v0.10.0)
6+
7+
### Features
8+
9+
* **api:** api update ([f4729e7](https://github.com/reductoai/reducto-python-sdk/commit/f4729e75b14a183d5d1b149462b57d60f3422664))
10+
* **api:** api update ([1aecd8c](https://github.com/reductoai/reducto-python-sdk/commit/1aecd8c14e04ce303d89f9836c53535a846a0ac3))
11+
* **api:** api update ([0b681c6](https://github.com/reductoai/reducto-python-sdk/commit/0b681c62d2af13122278997f6e69cb26d924b8f1))
12+
* **api:** api update ([49b78e3](https://github.com/reductoai/reducto-python-sdk/commit/49b78e3676539613da763948501c0440d43464f0))
13+
* **api:** api update ([5dca002](https://github.com/reductoai/reducto-python-sdk/commit/5dca00234d23889a2651d4ba548b45a244a8685f))
14+
* **api:** manual updates ([0bc45db](https://github.com/reductoai/reducto-python-sdk/commit/0bc45dbaab3fe20f07bd939cfa54bb9025ebc24c))
15+
* **client:** support file upload requests ([591d2a9](https://github.com/reductoai/reducto-python-sdk/commit/591d2a98324d60089ec452dcb1bad295aefdf103))
16+
17+
18+
### Bug Fixes
19+
20+
* make file parameter optional in upload method for presigned URL support ([#66](https://github.com/reductoai/reducto-python-sdk/issues/66)) ([5f7060d](https://github.com/reductoai/reducto-python-sdk/commit/5f7060da2af427a1567be05789a5b776b0300dff))
21+
* **parsing:** ignore empty metadata ([b572c21](https://github.com/reductoai/reducto-python-sdk/commit/b572c216b11ad81db6ef82ca7bb0da4725d11423))
22+
* **parsing:** parse extra field types ([45461eb](https://github.com/reductoai/reducto-python-sdk/commit/45461eb0465b9933c828d8ad138952ca2222f539))
23+
24+
25+
### Chores
26+
27+
* **project:** add settings file for vscode ([6bd9d30](https://github.com/reductoai/reducto-python-sdk/commit/6bd9d30367714341c832834ebcecb1471dd9fff1))
28+
329
## 0.9.0 (2025-07-21)
430

531
Full Changelog: [v0.8.0...v0.9.0](https://github.com/reductoai/reducto-python-sdk/compare/v0.8.0...v0.9.0)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,15 +216,15 @@ client.with_options(max_retries=5).parse.run(
216216

217217
### Timeouts
218218

219-
By default requests time out after 15 minutes. You can configure this with a `timeout` option,
219+
By default requests time out after 487 days. You can configure this with a `timeout` option,
220220
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
221221

222222
```python
223223
from reducto import Reducto
224224

225225
# Configure the default for all requests:
226226
client = Reducto(
227-
# 20 seconds (default is 15 minutes)
227+
# 20 seconds (default is 487 days)
228228
timeout=20.0,
229229
)
230230

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "reductoai"
3-
version = "0.9.0"
3+
version = "0.10.0"
44
description = "The official Python library for the reducto API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/reducto/_base_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,10 @@ def _build_request(
532532
is_body_allowed = options.method.lower() != "get"
533533

534534
if is_body_allowed:
535-
kwargs["json"] = json_data if is_given(json_data) else None
535+
if isinstance(json_data, bytes):
536+
kwargs["content"] = json_data
537+
else:
538+
kwargs["json"] = json_data if is_given(json_data) else None
536539
kwargs["files"] = files
537540
else:
538541
headers.pop("Content-Type", None)

src/reducto/_constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
66
OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
77

8-
# default timeout is 15 minutes
9-
DEFAULT_TIMEOUT = httpx.Timeout(timeout=900, connect=5.0)
8+
# default timeout is 487 days
9+
DEFAULT_TIMEOUT = httpx.Timeout(timeout=42076800, connect=5.0)
1010
DEFAULT_MAX_RETRIES = 2
1111
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
1212

src/reducto/_files.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
6969
return file
7070

7171
if is_tuple_t(file):
72-
return (file[0], _read_file_content(file[1]), *file[2:])
72+
return (file[0], read_file_content(file[1]), *file[2:])
7373

7474
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
7575

7676

77-
def _read_file_content(file: FileContent) -> HttpxFileContent:
77+
def read_file_content(file: FileContent) -> HttpxFileContent:
7878
if isinstance(file, os.PathLike):
7979
return pathlib.Path(file).read_bytes()
8080
return file
@@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes:
111111
return file
112112

113113
if is_tuple_t(file):
114-
return (file[0], await _async_read_file_content(file[1]), *file[2:])
114+
return (file[0], await async_read_file_content(file[1]), *file[2:])
115115

116116
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
117117

118118

119-
async def _async_read_file_content(file: FileContent) -> HttpxFileContent:
119+
async def async_read_file_content(file: FileContent) -> HttpxFileContent:
120120
if isinstance(file, os.PathLike):
121121
return await anyio.Path(file).read_bytes()
122122

0 commit comments

Comments
 (0)