Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
e70fbf4
chore(internal): codegen related update (#138)
stainless-app[bot] Jan 21, 2025
5580989
docs(raw responses): fix duplicate `the` (#140)
stainless-app[bot] Jan 21, 2025
56d0462
chore(internal): codegen related update (#141)
stainless-app[bot] Jan 22, 2025
cb5834c
chore(internal): minor style changes (#142)
stainless-app[bot] Jan 22, 2025
a4ac34f
chore(internal): minor formatting changes (#143)
stainless-app[bot] Jan 24, 2025
668a25d
feat(api): api update (#144)
stainless-app[bot] Jan 24, 2025
7dcce3a
codegen metadata
stainless-app[bot] Jan 30, 2025
f418605
chore(internal): change default timeout to an int (#146)
stainless-app[bot] Feb 4, 2025
9638e50
chore(internal): bummp ruff dependency (#147)
stainless-app[bot] Feb 4, 2025
3f9650f
fix: improve names for conflicting params (#148)
stainless-app[bot] Feb 5, 2025
2bbef8d
feat(client): send `X-Stainless-Read-Timeout` header (#149)
stainless-app[bot] Feb 6, 2025
0caeb28
chore(internal): fix type traversing dictionary params (#150)
stainless-app[bot] Feb 7, 2025
67e6469
chore(internal): minor type handling changes (#151)
stainless-app[bot] Feb 7, 2025
02af016
chore(internal): update client tests (#152)
stainless-app[bot] Feb 13, 2025
92577a2
fix: asyncify on non-asyncio runtimes (#153)
stainless-app[bot] Feb 14, 2025
2242fad
chore(internal): codegen related update (#154)
stainless-app[bot] Feb 19, 2025
153f86b
feat(client): allow passing `NotGiven` for body (#155)
stainless-app[bot] Feb 21, 2025
944423e
chore(internal): fix devcontainers setup (#156)
stainless-app[bot] Feb 22, 2025
30a260f
chore(internal): properly set __pydantic_private__ (#157)
stainless-app[bot] Feb 26, 2025
a8ee0e2
docs: update URLs from stainlessapi.com to stainless.com (#158)
stainless-app[bot] Feb 28, 2025
5a0da4d
chore(docs): update client docstring (#159)
stainless-app[bot] Feb 28, 2025
298eb9c
chore(internal): remove unused http client options forwarding (#160)
stainless-app[bot] Mar 4, 2025
c4a4e34
docs: revise readme docs about nested params (#161)
stainless-app[bot] Mar 11, 2025
ab64143
test: add DEFER_PYDANTIC_BUILD=false flag to tests (#162)
stainless-app[bot] Mar 11, 2025
d8b30ce
chore(internal): remove extra empty newlines (#163)
stainless-app[bot] Mar 14, 2025
1cb3903
chore(internal): codegen related update (#164)
stainless-app[bot] Mar 15, 2025
5ead610
chore(internal): bump rye to 0.44.0 (#165)
stainless-app[bot] Mar 15, 2025
850d425
fix(types): handle more discriminated union shapes (#166)
stainless-app[bot] Mar 15, 2025
06c63d2
feat(api): manual updates (#167)
stainless-app[bot] Mar 15, 2025
8990ba9
feat(api): manual updates (#168)
stainless-app[bot] Mar 15, 2025
202e065
codegen metadata
stainless-app[bot] Mar 15, 2025
dfbe97e
release: 4.6.0
stainless-app[bot] Mar 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}

USER vscode

RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.35.0" RYE_INSTALL_OPTION="--yes" bash
RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.44.0" RYE_INSTALL_OPTION="--yes" bash
ENV PATH=/home/vscode/.rye/shims:$PATH

RUN echo "[[ -d .venv ]] && source .venv/bin/activate" >> /home/vscode/.bashrc
RUN echo "[[ -d .venv ]] && source .venv/bin/activate || export PATH=\$PATH" >> /home/vscode/.bashrc
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
}
}
}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {}
}

// Features to add to the dev container. More info: https://containers.dev/features.
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
lint:
name: lint
runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v4
Expand All @@ -22,14 +21,15 @@ jobs:
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.35.0'
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Install dependencies
run: rye sync --all-features

- name: Run lints
run: ./scripts/lint

test:
name: test
runs-on: ubuntu-latest
Expand All @@ -42,12 +42,11 @@ jobs:
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.35.0'
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Bootstrap
run: ./scripts/bootstrap

- name: Run tests
run: ./scripts/test

2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.35.0'
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Publish to PyPI
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.5.0"
".": "4.6.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 91
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-69140680dde56332aa42ebbfbe12c0c3db2adf3904e4a821cee6465e491f4c57.yml
configured_endpoints: 93
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-02fbb644978089e8596def9999f5729633b652fba35bf04e374dbb71e7630355.yml
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# Changelog

## 4.6.0 (2025-03-15)

Full Changelog: [v4.5.0...v4.6.0](https://github.com/DataMini/asktable-python/compare/v4.5.0...v4.6.0)

### Features

* **api:** api update ([#144](https://github.com/DataMini/asktable-python/issues/144)) ([668a25d](https://github.com/DataMini/asktable-python/commit/668a25dd349090c2f095d068a0ada72587aac38f))
* **api:** manual updates ([#167](https://github.com/DataMini/asktable-python/issues/167)) ([06c63d2](https://github.com/DataMini/asktable-python/commit/06c63d292a5278295e93c4d7a65cf25b02234e2b))
* **api:** manual updates ([#168](https://github.com/DataMini/asktable-python/issues/168)) ([8990ba9](https://github.com/DataMini/asktable-python/commit/8990ba9c162f2224e23e8db58646f2c485f77e1c))
* **client:** allow passing `NotGiven` for body ([#155](https://github.com/DataMini/asktable-python/issues/155)) ([153f86b](https://github.com/DataMini/asktable-python/commit/153f86b5c5c0099edc9b0622ebe36553b653e8ca))
* **client:** send `X-Stainless-Read-Timeout` header ([#149](https://github.com/DataMini/asktable-python/issues/149)) ([2bbef8d](https://github.com/DataMini/asktable-python/commit/2bbef8d335a87602e14fbea387f3b7fe136424f0))


### Bug Fixes

* asyncify on non-asyncio runtimes ([#153](https://github.com/DataMini/asktable-python/issues/153)) ([92577a2](https://github.com/DataMini/asktable-python/commit/92577a2765975e59273e218ba20c93cbed7a05c1))
* **client:** mark some request bodies as optional ([153f86b](https://github.com/DataMini/asktable-python/commit/153f86b5c5c0099edc9b0622ebe36553b653e8ca))
* improve names for conflicting params ([#148](https://github.com/DataMini/asktable-python/issues/148)) ([3f9650f](https://github.com/DataMini/asktable-python/commit/3f9650f5519444a1517dcf85bf313780e5dd6cce))
* **types:** handle more discriminated union shapes ([#166](https://github.com/DataMini/asktable-python/issues/166)) ([850d425](https://github.com/DataMini/asktable-python/commit/850d425cf365d48cc9f7a41d09d295e8547befdf))


### Chores

* **docs:** update client docstring ([#159](https://github.com/DataMini/asktable-python/issues/159)) ([5a0da4d](https://github.com/DataMini/asktable-python/commit/5a0da4dd6288d7d55b7b2d4585b12e876d384423))
* **internal:** bummp ruff dependency ([#147](https://github.com/DataMini/asktable-python/issues/147)) ([9638e50](https://github.com/DataMini/asktable-python/commit/9638e50e2a5325ba4cb66e8cd987d96da80f37d5))
* **internal:** bump rye to 0.44.0 ([#165](https://github.com/DataMini/asktable-python/issues/165)) ([5ead610](https://github.com/DataMini/asktable-python/commit/5ead610c43bcde3e61ec6e2e6e4fd892be1f4e59))
* **internal:** change default timeout to an int ([#146](https://github.com/DataMini/asktable-python/issues/146)) ([f418605](https://github.com/DataMini/asktable-python/commit/f41860576a0d6e8ce78352de1e997c3e8149a52f))
* **internal:** codegen related update ([#138](https://github.com/DataMini/asktable-python/issues/138)) ([e70fbf4](https://github.com/DataMini/asktable-python/commit/e70fbf41048ca082ffd9f4888ccfa7bd9f97c57f))
* **internal:** codegen related update ([#141](https://github.com/DataMini/asktable-python/issues/141)) ([56d0462](https://github.com/DataMini/asktable-python/commit/56d0462efef6c92a6727fd91c638a19750195d4e))
* **internal:** codegen related update ([#154](https://github.com/DataMini/asktable-python/issues/154)) ([2242fad](https://github.com/DataMini/asktable-python/commit/2242fad33cc31d4bf434bc6161ca444c7cf3bf36))
* **internal:** codegen related update ([#164](https://github.com/DataMini/asktable-python/issues/164)) ([1cb3903](https://github.com/DataMini/asktable-python/commit/1cb390324e6894374519e8062b446873d138cde0))
* **internal:** fix devcontainers setup ([#156](https://github.com/DataMini/asktable-python/issues/156)) ([944423e](https://github.com/DataMini/asktable-python/commit/944423e7d0c69dcf0a54141ce69127db2369b247))
* **internal:** fix type traversing dictionary params ([#150](https://github.com/DataMini/asktable-python/issues/150)) ([0caeb28](https://github.com/DataMini/asktable-python/commit/0caeb28b8647a9753b16bbc8a2963f900e4dd9d2))
* **internal:** minor formatting changes ([#143](https://github.com/DataMini/asktable-python/issues/143)) ([a4ac34f](https://github.com/DataMini/asktable-python/commit/a4ac34fcf7a8350bdd03b5c51917ca5896183c63))
* **internal:** minor style changes ([#142](https://github.com/DataMini/asktable-python/issues/142)) ([cb5834c](https://github.com/DataMini/asktable-python/commit/cb5834c4e4819f6c9a99dcd9a9d8296b413d0317))
* **internal:** minor type handling changes ([#151](https://github.com/DataMini/asktable-python/issues/151)) ([67e6469](https://github.com/DataMini/asktable-python/commit/67e6469d84d6fc761ae2e7fc55d47ffb07c49309))
* **internal:** properly set __pydantic_private__ ([#157](https://github.com/DataMini/asktable-python/issues/157)) ([30a260f](https://github.com/DataMini/asktable-python/commit/30a260f78f2b32e82467afe05703e2f8aa88fc68))
* **internal:** remove extra empty newlines ([#163](https://github.com/DataMini/asktable-python/issues/163)) ([d8b30ce](https://github.com/DataMini/asktable-python/commit/d8b30cec54b715e20a90de84a4a3393a0b556c33))
* **internal:** remove unused http client options forwarding ([#160](https://github.com/DataMini/asktable-python/issues/160)) ([298eb9c](https://github.com/DataMini/asktable-python/commit/298eb9ca830efd80ca27e868a0081ff4822dc2db))
* **internal:** update client tests ([#152](https://github.com/DataMini/asktable-python/issues/152)) ([02af016](https://github.com/DataMini/asktable-python/commit/02af016ec2d3f945765bbc76a24a0a102757b966))


### Documentation

* **raw responses:** fix duplicate `the` ([#140](https://github.com/DataMini/asktable-python/issues/140)) ([5580989](https://github.com/DataMini/asktable-python/commit/55809895dc745aa046c93493ad7f658ed652c869))
* revise readme docs about nested params ([#161](https://github.com/DataMini/asktable-python/issues/161)) ([c4a4e34](https://github.com/DataMini/asktable-python/commit/c4a4e34b3ddc3a19aac34cd4f167af53e2665933))
* update URLs from stainlessapi.com to stainless.com ([#158](https://github.com/DataMini/asktable-python/issues/158)) ([a8ee0e2](https://github.com/DataMini/asktable-python/commit/a8ee0e203076b01180be2c164174a469c2f444ef))

## 4.5.0 (2025-01-19)

Full Changelog: [v4.4.0...v4.5.0](https://github.com/DataMini/asktable-python/compare/v4.4.0...v4.5.0)
Expand Down
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Asktable Python library provides convenient access to the Asktable REST API
application. The library includes type definitions for all request params and response fields,
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).

It is generated with [Stainless](https://www.stainlessapi.com/).
It is generated with [Stainless](https://www.stainless.com/).

## Documentation

Expand Down Expand Up @@ -134,6 +134,43 @@ for datasource in first_page.items:
# Remove `await` for non-async usage.
```

## Nested params

Nested parameters are dictionaries, typed using `TypedDict`, for example:

```python
from asktable import Asktable

client = Asktable()

response = client.sys.projects.api_keys.create_token(
project_id="project_id",
chat_role={
"role_id": "1",
"role_variables": {"id": "42"},
},
)
print(response.chat_role)
```

## File uploads

Request parameters that correspond to file uploads can be passed as `bytes`, a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.

```python
from pathlib import Path
from asktable import Asktable

client = Asktable()

client.datasources.add_file(
datasource_id="datasource_id",
file=Path("/path/to/file"),
)
```

The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.

## Handling errors

When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `asktable.APIConnectionError` is raised.
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Reporting Security Issues

This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.

To report a security issue, please contact the Stainless team at security@stainlessapi.com.
To report a security issue, please contact the Stainless team at security@stainless.com.

## Responsible Disclosure

Expand Down
Loading
Loading