Skip to content

Commit 35c9d49

Browse files
authored
Merge pull request #202 from DataMini/release-please--branches--main--changes--next
release: 5.5.0
2 parents b31a403 + b8f0491 commit 35c9d49

File tree

112 files changed

+5111
-1686
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+5111
-1686
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ on:
77
- 'integrated/**'
88
- 'stl-preview-head/**'
99
- 'stl-preview-base/**'
10+
pull_request:
11+
branches-ignore:
12+
- 'stl-preview-head/**'
13+
- 'stl-preview-base/**'
1014

1115
jobs:
1216
lint:
1317
timeout-minutes: 10
1418
name: lint
1519
runs-on: ${{ github.repository == 'stainless-sdks/asktable-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
20+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
1621
steps:
1722
- uses: actions/checkout@v4
1823

@@ -30,17 +35,31 @@ jobs:
3035
- name: Run lints
3136
run: ./scripts/lint
3237

33-
upload:
34-
if: github.repository == 'stainless-sdks/asktable-python'
38+
build:
39+
if: github.repository == 'stainless-sdks/asktable-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
3540
timeout-minutes: 10
36-
name: upload
41+
name: build
3742
permissions:
3843
contents: read
3944
id-token: write
4045
runs-on: depot-ubuntu-24.04
4146
steps:
4247
- uses: actions/checkout@v4
4348

49+
- name: Install Rye
50+
run: |
51+
curl -sSf https://rye.astral.sh/get | bash
52+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
53+
env:
54+
RYE_VERSION: '0.44.0'
55+
RYE_INSTALL_OPTION: '--yes'
56+
57+
- name: Install dependencies
58+
run: rye sync --all-features
59+
60+
- name: Run build
61+
run: rye build
62+
4463
- name: Get GitHub OIDC Token
4564
id: github-oidc
4665
uses: actions/github-script@v6
@@ -58,6 +77,7 @@ jobs:
5877
timeout-minutes: 10
5978
name: test
6079
runs-on: ${{ github.repository == 'stainless-sdks/asktable-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
80+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
6181
steps:
6282
- uses: actions/checkout@v4
6383

.release-please-manifest.json

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

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 96
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-fd9a749a4afed8a45757ab4e83984c36c56cf6f4f0d53b80d4d5e0022869c3e1.yml
3-
openapi_spec_hash: d5cf0471c4e715bdfbf597de3f591ef1
4-
config_hash: a572ab842ea60ce13f1d1a1358440cbe
1+
configured_endpoints: 107
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-420512609e3f9f33f8a5b2d0086d4d3152b78935f1dc689cf4c5adf245241ba8.yml
3+
openapi_spec_hash: a0055c3c329900b7a66dc27f4bea86cb
4+
config_hash: acdf4142177ed1932c2d82372693f811

CHANGELOG.md

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

3+
## 5.5.0 (2025-07-19)
4+
5+
Full Changelog: [v5.4.0...v5.5.0](https://github.com/DataMini/asktable-python/compare/v5.4.0...v5.5.0)
6+
7+
### Features
8+
9+
* **api:** add test set api ([cf653ef](https://github.com/DataMini/asktable-python/commit/cf653ef0d527894151c209f7eb79b120e8d7109c))
10+
* **api:** api update ([d7a73bc](https://github.com/DataMini/asktable-python/commit/d7a73bceb38896da2565dd7e1ae8a3e39529a685))
11+
* clean up environment call outs ([6002d27](https://github.com/DataMini/asktable-python/commit/6002d277b7004e7fdd69f8b23572cf84a6cf10da))
12+
* **client:** add follow_redirects request option ([b22320b](https://github.com/DataMini/asktable-python/commit/b22320bad43f0de89af6d252c36902b2cd08ec97))
13+
* **client:** add support for aiohttp ([292b89e](https://github.com/DataMini/asktable-python/commit/292b89e54d3215237251f84ebbae97d4cbf65310))
14+
15+
16+
### Bug Fixes
17+
18+
* **ci:** correct conditional ([b23a053](https://github.com/DataMini/asktable-python/commit/b23a0530daffe5b27939e7ab9516790f6fb36a7b))
19+
* **ci:** release-doctor — report correct token name ([71f15b7](https://github.com/DataMini/asktable-python/commit/71f15b7d055dafd7aabb993d5ca0f6ca33707620))
20+
* **client:** correctly parse binary response | stream ([5568773](https://github.com/DataMini/asktable-python/commit/5568773fc1b6ee7a5183cd5e6789ce6eafe119e8))
21+
* **client:** don't send Content-Type header on GET requests ([41feabc](https://github.com/DataMini/asktable-python/commit/41feabcb23fb5c257d18ba7f96f0ddb9304d53d5))
22+
* **docs/api:** remove references to nonexistent types ([7d673d4](https://github.com/DataMini/asktable-python/commit/7d673d44b295a507ca08ff0982cc5e033893e3d3))
23+
* **pagination:** correct next page check ([03552e7](https://github.com/DataMini/asktable-python/commit/03552e74ca1fa48289b48381777b1243398777bc))
24+
* **parsing:** correctly handle nested discriminated unions ([5fcaeb7](https://github.com/DataMini/asktable-python/commit/5fcaeb76ff37258c12becb7e459a3cfa56988fc0))
25+
* **tests:** fix: tests which call HTTP endpoints directly with the example parameters ([3036c4b](https://github.com/DataMini/asktable-python/commit/3036c4bdbe59cd13bdfacdd113478e3e6ddd8ca0))
26+
27+
28+
### Chores
29+
30+
* **ci:** change upload type ([267f707](https://github.com/DataMini/asktable-python/commit/267f707806319c9b4499046f286f891a985d22de))
31+
* **ci:** enable for pull requests ([a6636e7](https://github.com/DataMini/asktable-python/commit/a6636e7b8409f7750b52c4850f05be437e4ed31d))
32+
* **ci:** only run for pushes and fork pull requests ([f5756ca](https://github.com/DataMini/asktable-python/commit/f5756ca55464cba7219498f0fcf0786d299fdc7d))
33+
* **docs:** remove reference to rye shell ([9fc4749](https://github.com/DataMini/asktable-python/commit/9fc4749e8965d398f281078e14f0249d12571ace))
34+
* **docs:** remove unnecessary param examples ([d2875f3](https://github.com/DataMini/asktable-python/commit/d2875f3438404557c839e0d158a2e573c3607f1f))
35+
* **internal:** bump pinned h11 dep ([cb54577](https://github.com/DataMini/asktable-python/commit/cb545771166f525600c876d70e6ca9af74aada7f))
36+
* **internal:** codegen related update ([c281941](https://github.com/DataMini/asktable-python/commit/c28194157b0e93b082fc5c441528a4bdc0640c00))
37+
* **internal:** codegen related update ([65ea7c5](https://github.com/DataMini/asktable-python/commit/65ea7c536f5fe17dfb13666bf7e37f25bf470bd9))
38+
* **internal:** update conftest.py ([f06435d](https://github.com/DataMini/asktable-python/commit/f06435ded63522ac7f30d47b560183b86e95ef27))
39+
* **package:** mark python 3.13 as supported ([e1a20f7](https://github.com/DataMini/asktable-python/commit/e1a20f7a5f7ce9dee0d182c2addc5fcf8b4342ae))
40+
* **readme:** fix version rendering on pypi ([e05e6e5](https://github.com/DataMini/asktable-python/commit/e05e6e562cfddd5ef7b3ee27a2a155e0e8305e6c))
41+
* **readme:** update badges ([bc28102](https://github.com/DataMini/asktable-python/commit/bc281028397ea60d93f86ea563e3e9cba303b0c6))
42+
* **tests:** add tests for httpx client instantiation & proxies ([c620e09](https://github.com/DataMini/asktable-python/commit/c620e09f4be03fabc31167839018e69b8d7f5d7b))
43+
* **tests:** run tests in parallel ([9d9d65e](https://github.com/DataMini/asktable-python/commit/9d9d65e5be80faba732cd2d29854186ff565b4c7))
44+
* **tests:** skip some failing tests on the latest python versions ([188abef](https://github.com/DataMini/asktable-python/commit/188abef74adcaf1c5b8b4ee8b39315aba98c7f95))
45+
46+
47+
### Documentation
48+
49+
* **client:** fix httpx.Timeout documentation reference ([482e328](https://github.com/DataMini/asktable-python/commit/482e328e4938b04c3eca656984857d2ffc302fa3))
50+
351
## 5.4.0 (2025-05-27)
452

553
Full Changelog: [v5.3.1...v5.4.0](https://github.com/DataMini/asktable-python/compare/v5.3.1...v5.4.0)

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ $ rye sync --all-features
1717
You can then run scripts using `rye run python script.py` or by activating the virtual environment:
1818

1919
```sh
20-
$ rye shell
21-
# or manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work
20+
# Activate the virtual environment - https://docs.python.org/3/library/venv.html#how-venvs-work
2221
$ source .venv/bin/activate
2322

2423
# now you can omit the `rye run` prefix

README.md

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Asktable Python API library
22

3-
[![PyPI version](https://img.shields.io/pypi/v/asktable.svg)](https://pypi.org/project/asktable/)
3+
<!-- prettier-ignore -->
4+
[![PyPI version](https://img.shields.io/pypi/v/asktable.svg?label=pypi%20(stable))](https://pypi.org/project/asktable/)
45

56
The Asktable Python library provides convenient access to the Asktable REST API from any Python 3.8+
67
application. The library includes type definitions for all request params and response fields,
@@ -24,9 +25,12 @@ pip install asktable
2425
The full API of this library can be found in [api.md](api.md).
2526

2627
```python
28+
import os
2729
from asktable import Asktable
2830

29-
client = Asktable()
31+
client = Asktable(
32+
api_key=os.environ.get("ASKTABLE_API_KEY"), # This is the default and can be omitted
33+
)
3034

3135
datasource = client.datasources.create(
3236
engine="mysql",
@@ -44,10 +48,13 @@ so that your API Key is not stored in source control.
4448
Simply import `AsyncAsktable` instead of `Asktable` and use `await` with each API call:
4549

4650
```python
51+
import os
4752
import asyncio
4853
from asktable import AsyncAsktable
4954

50-
client = AsyncAsktable()
55+
client = AsyncAsktable(
56+
api_key=os.environ.get("ASKTABLE_API_KEY"), # This is the default and can be omitted
57+
)
5158

5259

5360
async def main() -> None:
@@ -62,6 +69,39 @@ asyncio.run(main())
6269

6370
Functionality between the synchronous and asynchronous clients is otherwise identical.
6471

72+
### With aiohttp
73+
74+
By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
75+
76+
You can enable this by installing `aiohttp`:
77+
78+
```sh
79+
# install from PyPI
80+
pip install asktable[aiohttp]
81+
```
82+
83+
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
84+
85+
```python
86+
import asyncio
87+
from asktable import DefaultAioHttpClient
88+
from asktable import AsyncAsktable
89+
90+
91+
async def main() -> None:
92+
async with AsyncAsktable(
93+
api_key="My API Key",
94+
http_client=DefaultAioHttpClient(),
95+
) as client:
96+
datasource = await client.datasources.create(
97+
engine="mysql",
98+
)
99+
print(datasource.id)
100+
101+
102+
asyncio.run(main())
103+
```
104+
65105
## Using types
66106

67107
Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
@@ -145,10 +185,7 @@ client = Asktable()
145185

146186
response = client.sys.projects.api_keys.create_token(
147187
project_id="project_id",
148-
chat_role={
149-
"role_id": "1",
150-
"role_variables": {"id": "42"},
151-
},
188+
chat_role={},
152189
)
153190
print(response.chat_role)
154191
```
@@ -240,7 +277,7 @@ client.with_options(max_retries=5).datasources.create(
240277
### Timeouts
241278

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

245282
```python
246283
from asktable import Asktable

0 commit comments

Comments
 (0)