Skip to content

Commit d2e1455

Browse files
authored
Merge pull request #114 from DataMini/release-please--branches--main--changes--next
release: 4.0.0
2 parents ba2f8b4 + 1fcbbce commit d2e1455

File tree

15 files changed

+131
-527
lines changed

15 files changed

+131
-527
lines changed

.release-please-manifest.json

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

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 92
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-812fbef9135838630557abadedcc8c593c10d2133388aaea70b9a313fc546941.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-8db0b80dcaf777d02fd5720543576e1484e9dc93db7c1b50a11ee85c215f88b4.yml

CHANGELOG.md

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

3+
## 4.0.0 (2025-01-09)
4+
5+
Full Changelog: [v3.14.0...v4.0.0](https://github.com/DataMini/asktable-python/compare/v3.14.0...v4.0.0)
6+
7+
### ⚠ BREAKING CHANGES
8+
9+
* **api:** better support union schemas with common properties ([#116](https://github.com/DataMini/asktable-python/issues/116))
10+
11+
### Features
12+
13+
* **api:** api update ([#117](https://github.com/DataMini/asktable-python/issues/117)) ([08bb9e3](https://github.com/DataMini/asktable-python/commit/08bb9e3eab139c7bdb5b19d0a068080e21dade45))
14+
* **api:** manual updates ([#118](https://github.com/DataMini/asktable-python/issues/118)) ([717bcd7](https://github.com/DataMini/asktable-python/commit/717bcd7ae11017dda379a4f9617f9be0c12f55d1))
15+
16+
17+
### Bug Fixes
18+
19+
* **api:** better support union schemas with common properties ([#116](https://github.com/DataMini/asktable-python/issues/116)) ([dced8d4](https://github.com/DataMini/asktable-python/commit/dced8d4627b4ab2264b1d6786d25ea27abc41f66))
20+
21+
22+
### Chores
23+
24+
* **internal:** codegen related update ([#115](https://github.com/DataMini/asktable-python/issues/115)) ([fbf67b0](https://github.com/DataMini/asktable-python/commit/fbf67b023055838adee929909c610df65027848b))
25+
26+
27+
### Documentation
28+
29+
* fix typos ([#113](https://github.com/DataMini/asktable-python/issues/113)) ([8306d10](https://github.com/DataMini/asktable-python/commit/8306d102df314903bd18f2d8b77c36a7c39f23ec))
30+
331
## 3.14.0 (2025-01-08)
432

533
Full Changelog: [v3.13.0...v3.14.0](https://github.com/DataMini/asktable-python/compare/v3.13.0...v3.14.0)

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ except asktable.APIStatusError as e:
164164
print(e.response)
165165
```
166166

167-
Error codes are as followed:
167+
Error codes are as follows:
168168

169169
| Status Code | Error Type |
170170
| ----------- | -------------------------- |
@@ -303,8 +303,7 @@ If you need to access undocumented endpoints, params, or response properties, th
303303
#### Undocumented endpoints
304304

305305
To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
306-
http verbs. Options on the client will be respected (such as retries) will be respected when making this
307-
request.
306+
http verbs. Options on the client will be respected (such as retries) when making this request.
308307

309308
```py
310309
import httpx
@@ -376,7 +375,7 @@ with Asktable() as client:
376375
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
377376

378377
1. Changes that only affect static types, without breaking runtime behavior.
379-
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
378+
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
380379
3. Changes that we do not expect to impact the vast majority of users in practice.
381380

382381
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ from asktable.types import (
150150
Meta,
151151
DatasourceRetrieveResponse,
152152
DatasourceDeleteResponse,
153-
DatasourceAddFilesResponse,
153+
DatasourceAddFileResponse,
154154
DatasourceDeleteFileResponse,
155155
)
156156
```
@@ -162,7 +162,7 @@ Methods:
162162
- <code title="patch /datasources/{datasource_id}">client.datasources.<a href="./src/asktable/resources/datasources/datasources.py">update</a>(datasource_id, \*\*<a href="src/asktable/types/datasource_update_params.py">params</a>) -> <a href="./src/asktable/types/datasource.py">Datasource</a></code>
163163
- <code title="get /datasources">client.datasources.<a href="./src/asktable/resources/datasources/datasources.py">list</a>(\*\*<a href="src/asktable/types/datasource_list_params.py">params</a>) -> <a href="./src/asktable/types/datasource.py">SyncPage[Datasource]</a></code>
164164
- <code title="delete /datasources/{datasource_id}">client.datasources.<a href="./src/asktable/resources/datasources/datasources.py">delete</a>(datasource_id) -> <a href="./src/asktable/types/datasource_delete_response.py">object</a></code>
165-
- <code title="post /datasources/{datasource_id}/files">client.datasources.<a href="./src/asktable/resources/datasources/datasources.py">add_files</a>(datasource_id, \*\*<a href="src/asktable/types/datasource_add_files_params.py">params</a>) -> <a href="./src/asktable/types/datasource_add_files_response.py">object</a></code>
165+
- <code title="post /datasources/{datasource_id}/files">client.datasources.<a href="./src/asktable/resources/datasources/datasources.py">add_file</a>(datasource_id, \*\*<a href="src/asktable/types/datasource_add_file_params.py">params</a>) -> <a href="./src/asktable/types/datasource_add_file_response.py">object</a></code>
166166
- <code title="delete /datasources/{datasource_id}/files/{file_id}">client.datasources.<a href="./src/asktable/resources/datasources/datasources.py">delete_file</a>(file_id, \*, datasource_id) -> <a href="./src/asktable/types/datasource_delete_file_response.py">object</a></code>
167167

168168
## Meta

pyproject.toml

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

src/asktable/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "asktable"
4-
__version__ = "3.14.0" # x-release-please-version
4+
__version__ = "4.0.0" # x-release-please-version

src/asktable/resources/datasources/datasources.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Mapping, Optional, cast
5+
from typing import Mapping, Optional, cast
66
from typing_extensions import Literal
77

88
import httpx
@@ -19,7 +19,7 @@
1919
datasource_list_params,
2020
datasource_create_params,
2121
datasource_update_params,
22-
datasource_add_files_params,
22+
datasource_add_file_params,
2323
)
2424
from .indexes import (
2525
IndexesResource,
@@ -347,11 +347,11 @@ def delete(
347347
cast_to=object,
348348
)
349349

350-
def add_files(
350+
def add_file(
351351
self,
352352
datasource_id: str,
353353
*,
354-
files: List[FileTypes],
354+
file: FileTypes,
355355
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
356356
# The extra values given here take precedence over values defined on the client or passed to this method.
357357
extra_headers: Headers | None = None,
@@ -373,16 +373,16 @@ def add_files(
373373
"""
374374
if not datasource_id:
375375
raise ValueError(f"Expected a non-empty value for `datasource_id` but received {datasource_id!r}")
376-
body = deepcopy_minimal({"files": files})
377-
extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", "<array>"]])
376+
body = deepcopy_minimal({"file": file})
377+
files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
378378
# It should be noted that the actual Content-Type header that will be
379379
# sent to the server will contain a `boundary` parameter, e.g.
380380
# multipart/form-data; boundary=---abc--
381381
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
382382
return self._post(
383383
f"/datasources/{datasource_id}/files",
384-
body=maybe_transform(body, datasource_add_files_params.DatasourceAddFilesParams),
385-
files=extracted_files,
384+
body=maybe_transform(body, datasource_add_file_params.DatasourceAddFileParams),
385+
files=files,
386386
options=make_request_options(
387387
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
388388
),
@@ -778,11 +778,11 @@ async def delete(
778778
cast_to=object,
779779
)
780780

781-
async def add_files(
781+
async def add_file(
782782
self,
783783
datasource_id: str,
784784
*,
785-
files: List[FileTypes],
785+
file: FileTypes,
786786
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
787787
# The extra values given here take precedence over values defined on the client or passed to this method.
788788
extra_headers: Headers | None = None,
@@ -804,16 +804,16 @@ async def add_files(
804804
"""
805805
if not datasource_id:
806806
raise ValueError(f"Expected a non-empty value for `datasource_id` but received {datasource_id!r}")
807-
body = deepcopy_minimal({"files": files})
808-
extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", "<array>"]])
807+
body = deepcopy_minimal({"file": file})
808+
files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
809809
# It should be noted that the actual Content-Type header that will be
810810
# sent to the server will contain a `boundary` parameter, e.g.
811811
# multipart/form-data; boundary=---abc--
812812
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
813813
return await self._post(
814814
f"/datasources/{datasource_id}/files",
815-
body=await async_maybe_transform(body, datasource_add_files_params.DatasourceAddFilesParams),
816-
files=extracted_files,
815+
body=await async_maybe_transform(body, datasource_add_file_params.DatasourceAddFileParams),
816+
files=files,
817817
options=make_request_options(
818818
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
819819
),
@@ -876,8 +876,8 @@ def __init__(self, datasources: DatasourcesResource) -> None:
876876
self.delete = to_raw_response_wrapper(
877877
datasources.delete,
878878
)
879-
self.add_files = to_raw_response_wrapper(
880-
datasources.add_files,
879+
self.add_file = to_raw_response_wrapper(
880+
datasources.add_file,
881881
)
882882
self.delete_file = to_raw_response_wrapper(
883883
datasources.delete_file,
@@ -915,8 +915,8 @@ def __init__(self, datasources: AsyncDatasourcesResource) -> None:
915915
self.delete = async_to_raw_response_wrapper(
916916
datasources.delete,
917917
)
918-
self.add_files = async_to_raw_response_wrapper(
919-
datasources.add_files,
918+
self.add_file = async_to_raw_response_wrapper(
919+
datasources.add_file,
920920
)
921921
self.delete_file = async_to_raw_response_wrapper(
922922
datasources.delete_file,
@@ -954,8 +954,8 @@ def __init__(self, datasources: DatasourcesResource) -> None:
954954
self.delete = to_streamed_response_wrapper(
955955
datasources.delete,
956956
)
957-
self.add_files = to_streamed_response_wrapper(
958-
datasources.add_files,
957+
self.add_file = to_streamed_response_wrapper(
958+
datasources.add_file,
959959
)
960960
self.delete_file = to_streamed_response_wrapper(
961961
datasources.delete_file,
@@ -993,8 +993,8 @@ def __init__(self, datasources: AsyncDatasourcesResource) -> None:
993993
self.delete = async_to_streamed_response_wrapper(
994994
datasources.delete,
995995
)
996-
self.add_files = async_to_streamed_response_wrapper(
997-
datasources.add_files,
996+
self.add_file = async_to_streamed_response_wrapper(
997+
datasources.add_file,
998998
)
999999
self.delete_file = async_to_streamed_response_wrapper(
10001000
datasources.delete_file,

0 commit comments

Comments
 (0)