Skip to content

Commit d3cbda0

Browse files
feat(api): api update
1 parent b48a04d commit d3cbda0

File tree

12 files changed

+216
-176
lines changed

12 files changed

+216
-176
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 107
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-6e642a3ad811f8391e0f6f9644177b6d75093111e0b26753ab1be472571e55c1.yml
3-
openapi_spec_hash: fb38fedd6a15285540b1eb45521518a8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-18a8c8242c5e5c5886a2a31908480384759e5c2239664797372c109538408917.yml
3+
openapi_spec_hash: a7c5019fc13696353a6a97d4a68cf729
44
config_hash: acdf4142177ed1932c2d82372693f811

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Homepage = "https://github.com/DataMini/asktable-python"
3939
Repository = "https://github.com/DataMini/asktable-python"
4040

4141
[project.optional-dependencies]
42-
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
42+
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
4343

4444
[tool.rye]
4545
managed = true

requirements-dev.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ httpx==0.28.1
5656
# via asktable
5757
# via httpx-aiohttp
5858
# via respx
59-
httpx-aiohttp==0.1.8
59+
httpx-aiohttp==0.1.9
6060
# via asktable
6161
idna==3.4
6262
# via anyio

requirements.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ httpcore==1.0.9
4343
httpx==0.28.1
4444
# via asktable
4545
# via httpx-aiohttp
46-
httpx-aiohttp==0.1.8
46+
httpx-aiohttp==0.1.9
4747
# via asktable
4848
idna==3.4
4949
# via anyio

src/asktable/_streaming.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ def __stream__(self) -> Iterator[_T]:
5757
for sse in iterator:
5858
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
5959

60-
# Ensure the entire stream is consumed
61-
for _sse in iterator:
62-
...
60+
# As we might not fully consume the response stream, we need to close it explicitly
61+
response.close()
6362

6463
def __enter__(self) -> Self:
6564
return self
@@ -121,9 +120,8 @@ async def __stream__(self) -> AsyncIterator[_T]:
121120
async for sse in iterator:
122121
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
123122

124-
# Ensure the entire stream is consumed
125-
async for _sse in iterator:
126-
...
123+
# As we might not fully consume the response stream, we need to close it explicitly
124+
await response.aclose()
127125

128126
async def __aenter__(self) -> Self:
129127
return self

src/asktable/_utils/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
133133
# Type safe methods for narrowing types with TypeVars.
134134
# The default narrowing for isinstance(obj, dict) is dict[unknown, unknown],
135135
# however this cause Pyright to rightfully report errors. As we know we don't
136-
# care about the contained types we can safely use `object` in it's place.
136+
# care about the contained types we can safely use `object` in its place.
137137
#
138138
# There are two separate functions defined, `is_*` and `is_*_t` for different use cases.
139139
# `is_*` is for when you're dealing with an unknown input

src/asktable/resources/datasources/datasources.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def create(
116116
"mogdb",
117117
"hologres",
118118
"maxcompute",
119+
"dap",
119120
],
120121
access_config: Optional[datasource_create_params.AccessConfig] | Omit = omit,
121122
name: Optional[str] | Omit = omit,
@@ -224,6 +225,7 @@ def update(
224225
"mogdb",
225226
"hologres",
226227
"maxcompute",
228+
"dap",
227229
]
228230
]
229231
| Omit = omit,
@@ -614,6 +616,7 @@ async def create(
614616
"mogdb",
615617
"hologres",
616618
"maxcompute",
619+
"dap",
617620
],
618621
access_config: Optional[datasource_create_params.AccessConfig] | Omit = omit,
619622
name: Optional[str] | Omit = omit,
@@ -722,6 +725,7 @@ async def update(
722725
"mogdb",
723726
"hologres",
724727
"maxcompute",
728+
"dap",
725729
]
726730
]
727731
| Omit = omit,

src/asktable/types/datasource.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class Datasource(BaseModel):
4040
"mogdb",
4141
"hologres",
4242
"maxcompute",
43+
"dap",
4344
]
4445
"""数据源引擎"""
4546

src/asktable/types/datasource_create_params.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class DatasourceCreateParams(TypedDict, total=False):
4141
"mogdb",
4242
"hologres",
4343
"maxcompute",
44+
"dap",
4445
]
4546
]
4647
"""数据源引擎"""

src/asktable/types/datasource_retrieve_response.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ class DatasourceRetrieveResponse(BaseModel):
9595
"mogdb",
9696
"hologres",
9797
"maxcompute",
98+
"dap",
9899
]
99100
"""数据源引擎"""
100101

0 commit comments

Comments
 (0)