Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
8c48f1b
fix(parsing): ignore empty metadata
stainless-app[bot] Jul 22, 2025
40c9351
fix(parsing): parse extra field types
stainless-app[bot] Jul 23, 2025
1641a3d
chore(project): add settings file for vscode
stainless-app[bot] Jul 25, 2025
e9bac63
feat(client): support file upload requests
stainless-app[bot] Jul 31, 2025
ffc99de
codegen metadata
stainless-app[bot] Aug 1, 2025
21141b6
codegen metadata
stainless-app[bot] Aug 1, 2025
47ae330
chore(internal): fix ruff target version
stainless-app[bot] Aug 6, 2025
5d3abad
chore: update @stainless-api/prism-cli to v5.15.0
stainless-app[bot] Aug 9, 2025
595c402
chore(internal): update comment in script
stainless-app[bot] Aug 9, 2025
b388e91
codegen metadata
stainless-app[bot] Aug 12, 2025
fd21534
feat(api): api update
stainless-app[bot] Aug 14, 2025
259b363
codegen metadata
stainless-app[bot] Aug 18, 2025
d2a054d
codegen metadata
stainless-app[bot] Aug 19, 2025
653ff06
chore: update github action
stainless-app[bot] Aug 22, 2025
7a17247
feat(api): api update
stainless-app[bot] Aug 23, 2025
945b50b
codegen metadata
stainless-app[bot] Aug 26, 2025
1781814
chore(internal): change ci workflow machines
stainless-app[bot] Aug 26, 2025
2bc84ae
fix: avoid newer type syntax
stainless-app[bot] Aug 27, 2025
5bf3c78
chore(internal): update pyright exclude list
stainless-app[bot] Aug 27, 2025
d34ae74
chore(internal): add Sequence related utils
stainless-app[bot] Aug 30, 2025
8a97051
codegen metadata
stainless-app[bot] Sep 1, 2025
cfdf227
codegen metadata
stainless-app[bot] Sep 1, 2025
c595655
codegen metadata
stainless-app[bot] Sep 1, 2025
3726cd6
codegen metadata
stainless-app[bot] Sep 1, 2025
2780cd9
codegen metadata
stainless-app[bot] Sep 2, 2025
19c2831
codegen metadata
stainless-app[bot] Sep 2, 2025
24f5841
codegen metadata
stainless-app[bot] Sep 2, 2025
be4a6d6
feat(types): replace List[str] with SequenceNotStr in params
stainless-app[bot] Sep 3, 2025
8fa327a
feat(api): api update
stainless-app[bot] Sep 3, 2025
7d6836d
feat: improve future compat with pydantic v3
stainless-app[bot] Sep 4, 2025
14bda03
codegen metadata
stainless-app[bot] Sep 4, 2025
3a81ab1
chore(internal): move mypy configurations to `pyproject.toml` file
stainless-app[bot] Sep 5, 2025
f8251b5
chore(tests): simplify `get_platform` test
stainless-app[bot] Sep 6, 2025
c549248
codegen metadata
stainless-app[bot] Sep 6, 2025
eb2d958
codegen metadata
stainless-app[bot] Sep 6, 2025
d944835
codegen metadata
stainless-app[bot] Sep 9, 2025
181ebc7
codegen metadata
stainless-app[bot] Sep 9, 2025
ce1ef01
codegen metadata
stainless-app[bot] Sep 11, 2025
7acca03
codegen metadata
stainless-app[bot] Sep 16, 2025
b555909
codegen metadata
stainless-app[bot] Sep 16, 2025
7768ab5
chore(internal): update pydantic dependency
stainless-app[bot] Sep 17, 2025
6293506
codegen metadata
stainless-app[bot] Sep 17, 2025
8e2933a
feat(api): api update
stainless-app[bot] Sep 18, 2025
e2ab3d3
chore(types): change optional parameter type from NotGiven to Omit
stainless-app[bot] Sep 19, 2025
689b9c0
feat(api): api update
stainless-app[bot] Sep 22, 2025
47ec4b1
codegen metadata
stainless-app[bot] Sep 22, 2025
100fe70
codegen metadata
stainless-app[bot] Sep 27, 2025
8075ce8
codegen metadata
stainless-app[bot] Sep 27, 2025
1d6a595
codegen metadata
stainless-app[bot] Sep 28, 2025
8e94324
feat(api): api update
stainless-app[bot] Oct 14, 2025
b48a04d
codegen metadata
stainless-app[bot] Oct 14, 2025
d3cbda0
feat(api): api update
stainless-app[bot] Nov 4, 2025
d79fd22
feat(api): api update
stainless-app[bot] Nov 7, 2025
ba7ea07
codegen metadata
stainless-app[bot] Nov 8, 2025
1d758e9
codegen metadata
stainless-app[bot] Nov 8, 2025
94adaea
feat(api): api update
stainless-app[bot] Nov 20, 2025
a62c00a
feat(api): api update
stainless-app[bot] Nov 24, 2025
7581b44
codegen metadata
stainless-app[bot] Nov 25, 2025
3cfd6ce
codegen metadata
stainless-app[bot] Nov 26, 2025
692c5e4
feat(api): api update
stainless-app[bot] Dec 20, 2025
8c5fae5
codegen metadata
stainless-app[bot] Dec 20, 2025
8acf45b
codegen metadata
stainless-app[bot] Dec 20, 2025
22b56f9
codegen metadata
stainless-app[bot] Dec 21, 2025
d2a9142
codegen metadata
stainless-app[bot] Dec 21, 2025
71bc9ee
codegen metadata
stainless-app[bot] Dec 21, 2025
d4c20f9
codegen metadata
stainless-app[bot] Dec 23, 2025
e8e42f7
codegen metadata
stainless-app[bot] Dec 23, 2025
6e071ea
codegen metadata
stainless-app[bot] Dec 26, 2025
b07e756
release: 5.6.0
stainless-app[bot] Dec 26, 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
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ jobs:
run: ./scripts/lint

build:
if: github.repository == 'stainless-sdks/asktable-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
timeout-minutes: 10
name: build
permissions:
contents: read
id-token: write
runs-on: depot-ubuntu-24.04
runs-on: ${{ github.repository == 'stainless-sdks/asktable-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4

Expand All @@ -61,12 +61,14 @@ jobs:
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/asktable-python'
id: github-oidc
uses: actions/github-script@v6
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/asktable-python'
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.prism.log
.vscode
_dev

__pycache__
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 @@
{
".": "5.5.0"
".": "5.6.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 107
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-420512609e3f9f33f8a5b2d0086d4d3152b78935f1dc689cf4c5adf245241ba8.yml
openapi_spec_hash: a0055c3c329900b7a66dc27f4bea86cb
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-9700b1610662cf5565932faaf0ef502cae2c2a8fc9504381570b8f4780fce757.yml
openapi_spec_hash: 740fbb5e75123194c130ec62b4c2b956
config_hash: acdf4142177ed1932c2d82372693f811
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.analysis.importFormat": "relative",
}
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Changelog

## 5.6.0 (2025-12-26)

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

### Features

* **api:** api update ([692c5e4](https://github.com/DataMini/asktable-python/commit/692c5e4a06ed72d630cae83806a89eb36316e647))
* **api:** api update ([a62c00a](https://github.com/DataMini/asktable-python/commit/a62c00ae12cbc0efdbcb4bdf02480ddbb36d693a))
* **api:** api update ([94adaea](https://github.com/DataMini/asktable-python/commit/94adaeae5c0a3ab51b8d4f9ef9acba27d87efc06))
* **api:** api update ([d79fd22](https://github.com/DataMini/asktable-python/commit/d79fd224c090d22b32cc02776c5fd32ea56d2a7b))
* **api:** api update ([d3cbda0](https://github.com/DataMini/asktable-python/commit/d3cbda00e41261e559ba2111b843b1b10f9fb772))
* **api:** api update ([8e94324](https://github.com/DataMini/asktable-python/commit/8e94324216695bc96c20ed8b066a342d35b1f377))
* **api:** api update ([689b9c0](https://github.com/DataMini/asktable-python/commit/689b9c0c7863e30ea3a614607c1aac22f5745b52))
* **api:** api update ([8e2933a](https://github.com/DataMini/asktable-python/commit/8e2933a2a07175e5b2a817f9243df5952b19a9fa))
* **api:** api update ([8fa327a](https://github.com/DataMini/asktable-python/commit/8fa327a7bb92dc4b4aeb81ff356989c13712166d))
* **api:** api update ([7a17247](https://github.com/DataMini/asktable-python/commit/7a17247ed3d0cb95ec279c1627b51dfb2ce48572))
* **api:** api update ([fd21534](https://github.com/DataMini/asktable-python/commit/fd2153419e2ba1424b40398fef454d01db6d4a79))
* **client:** support file upload requests ([e9bac63](https://github.com/DataMini/asktable-python/commit/e9bac63f9b86123f21df0343e44bd9423e053bbe))
* improve future compat with pydantic v3 ([7d6836d](https://github.com/DataMini/asktable-python/commit/7d6836dc486cd6287e806f18177b2c4afb1be2e5))
* **types:** replace List[str] with SequenceNotStr in params ([be4a6d6](https://github.com/DataMini/asktable-python/commit/be4a6d685ff133354c4b242992de4a80f475c2d4))


### Bug Fixes

* avoid newer type syntax ([2bc84ae](https://github.com/DataMini/asktable-python/commit/2bc84ae95415f7377dcbf554faf6d057605f5c74))
* **parsing:** ignore empty metadata ([8c48f1b](https://github.com/DataMini/asktable-python/commit/8c48f1b05dbebb99a432ab9fd7b57f8aed109d60))
* **parsing:** parse extra field types ([40c9351](https://github.com/DataMini/asktable-python/commit/40c9351059a44df1f640f5791a126e175ebadad6))


### Chores

* **internal:** add Sequence related utils ([d34ae74](https://github.com/DataMini/asktable-python/commit/d34ae74d7dd281b8b1bc806aec5965a042550d88))
* **internal:** change ci workflow machines ([1781814](https://github.com/DataMini/asktable-python/commit/17818149ddfaa3397db71e1a6a2500b997576a97))
* **internal:** fix ruff target version ([47ae330](https://github.com/DataMini/asktable-python/commit/47ae33089939da844b9fc6f96ea1d7a56d57887e))
* **internal:** move mypy configurations to `pyproject.toml` file ([3a81ab1](https://github.com/DataMini/asktable-python/commit/3a81ab10fc9090dd6e0c850ebf4d2bc5dd0774aa))
* **internal:** update comment in script ([595c402](https://github.com/DataMini/asktable-python/commit/595c4022caf668b57ad4dab50ec2e8a7dc3227af))
* **internal:** update pydantic dependency ([7768ab5](https://github.com/DataMini/asktable-python/commit/7768ab57521d3e09e550013c14b188e6aeb62fd1))
* **internal:** update pyright exclude list ([5bf3c78](https://github.com/DataMini/asktable-python/commit/5bf3c78a9d79882f1c2e7e4245187cbb1813229d))
* **project:** add settings file for vscode ([1641a3d](https://github.com/DataMini/asktable-python/commit/1641a3d8c4a5647a81b6292b3fd8805ab3132bb8))
* **tests:** simplify `get_platform` test ([f8251b5](https://github.com/DataMini/asktable-python/commit/f8251b5a76926a6603865967d8e94071a72f5d26))
* **types:** change optional parameter type from NotGiven to Omit ([e2ab3d3](https://github.com/DataMini/asktable-python/commit/e2ab3d3508972ea2ac5df4ab1824036070eaf732))
* update @stainless-api/prism-cli to v5.15.0 ([5d3abad](https://github.com/DataMini/asktable-python/commit/5d3abad79640464784e731af282d02600606db98))
* update github action ([653ff06](https://github.com/DataMini/asktable-python/commit/653ff06315c440c09e931828916b8ff38a41d6bd))

## 5.5.0 (2025-07-19)

Full Changelog: [v5.4.0...v5.5.0](https://github.com/DataMini/asktable-python/compare/v5.4.0...v5.5.0)
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- prettier-ignore -->
[![PyPI version](https://img.shields.io/pypi/v/asktable.svg?label=pypi%20(stable))](https://pypi.org/project/asktable/)

The Asktable Python library provides convenient access to the Asktable REST API from any Python 3.8+
The Asktable Python library provides convenient access to the Asktable REST API from any Python 3.9+
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).

Expand Down Expand Up @@ -83,14 +83,15 @@ pip install asktable[aiohttp]
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

```python
import os
import asyncio
from asktable import DefaultAioHttpClient
from asktable import AsyncAsktable


async def main() -> None:
async with AsyncAsktable(
api_key="My API Key",
api_key=os.environ.get("ASKTABLE_API_KEY"), # This is the default and can be omitted
http_client=DefaultAioHttpClient(),
) as client:
datasource = await client.datasources.create(
Expand Down Expand Up @@ -469,7 +470,7 @@ print(asktable.__version__)

## Requirements

Python 3.8 or higher.
Python 3.9 or higher.

## Contributing

Expand Down
16 changes: 0 additions & 16 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ from asktable.types import Policy

# Sys

Types:

```python
from asktable.types import SyUpdateConfigResponse
```

Methods:

- <code title="patch /v1/sys/config">client.sys.<a href="./src/asktable/resources/sys/sys.py">update_config</a>(\*\*<a href="src/asktable/types/sy_update_config_params.py">params</a>) -> <a href="./src/asktable/types/sy_update_config_response.py">SyUpdateConfigResponse</a></code>

## Projects

Types:
Expand Down Expand Up @@ -229,12 +219,6 @@ Methods:
- <code title="post /v1/single-turn/q2s">client.sqls.<a href="./src/asktable/resources/sqls.py">create</a>(\*\*<a href="src/asktable/types/sql_create_params.py">params</a>) -> <a href="./src/asktable/types/query_response.py">QueryResponse</a></code>
- <code title="get /v1/single-turn/q2s">client.sqls.<a href="./src/asktable/resources/sqls.py">list</a>(\*\*<a href="src/asktable/types/sql_list_params.py">params</a>) -> <a href="./src/asktable/types/query_response.py">SyncPage[QueryResponse]</a></code>

# Caches

Methods:

- <code title="delete /v1/caches/{cache_id}">client.caches.<a href="./src/asktable/resources/caches.py">delete</a>(cache_id) -> None</code>

# Integration

Types:
Expand Down
50 changes: 0 additions & 50 deletions mypy.ini

This file was deleted.

86 changes: 72 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
[project]
name = "asktable"
version = "5.5.0"
version = "5.6.0"
description = "The official Python library for the Asktable API"
dynamic = ["readme"]
license = "Apache-2.0"
authors = [
{ name = "Asktable", email = "hi@datamini.ai" },
]

dependencies = [
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.10, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.10, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
]
requires-python = ">= 3.8"

requires-python = ">= 3.9"
classifiers = [
"Typing :: Typed",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
Expand All @@ -39,14 +41,14 @@ Homepage = "https://github.com/DataMini/asktable-python"
Repository = "https://github.com/DataMini/asktable-python"

[project.optional-dependencies]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]

[tool.rye]
managed = true
# version pins are in requirements-dev.lock
dev-dependencies = [
"pyright==1.1.399",
"mypy",
"mypy==1.17",
"respx",
"pytest",
"pytest-asyncio",
Expand All @@ -56,7 +58,6 @@ dev-dependencies = [
"dirty-equals>=0.6.0",
"importlib-metadata>=6.7.0",
"rich>=13.7.1",
"nest_asyncio==1.6.0",
"pytest-xdist>=3.6.1",
]

Expand Down Expand Up @@ -142,12 +143,13 @@ filterwarnings = [
# there are a couple of flags that are still disabled by
# default in strict mode as they are experimental and niche.
typeCheckingMode = "strict"
pythonVersion = "3.8"
pythonVersion = "3.9"

exclude = [
"_dev",
".venv",
".nox",
".git",
]

reportImplicitOverride = true
Expand All @@ -156,10 +158,62 @@ reportOverlappingOverload = false
reportImportCycles = false
reportPrivateUsage = false

[tool.mypy]
pretty = true
show_error_codes = true

# Exclude _files.py because mypy isn't smart enough to apply
# the correct type narrowing and as this is an internal module
# it's fine to just use Pyright.
#
# We also exclude our `tests` as mypy doesn't always infer
# types correctly and Pyright will still catch any type errors.
exclude = ['src/asktable/_files.py', '_dev/.*.py', 'tests/.*']

strict_equality = true
implicit_reexport = true
check_untyped_defs = true
no_implicit_optional = true

warn_return_any = true
warn_unreachable = true
warn_unused_configs = true

# Turn these options off as it could cause conflicts
# with the Pyright options.
warn_unused_ignores = false
warn_redundant_casts = false

disallow_any_generics = true
disallow_untyped_defs = true
disallow_untyped_calls = true
disallow_subclassing_any = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
cache_fine_grained = true

# By default, mypy reports an error if you assign a value to the result
# of a function call that doesn't return anything. We do this in our test
# cases:
# ```
# result = ...
# assert result is None
# ```
# Changing this codegen to make mypy happy would increase complexity
# and would not be worth it.
disable_error_code = "func-returns-value,overload-cannot-match"

# https://github.com/python/mypy/issues/12162
[[tool.mypy.overrides]]
module = "black.files.*"
ignore_errors = true
ignore_missing_imports = true


[tool.ruff]
line-length = 120
output-format = "grouped"
target-version = "py37"
target-version = "py38"

[tool.ruff.format]
docstring-code-format = true
Expand All @@ -172,6 +226,8 @@ select = [
"B",
# remove unused imports
"F401",
# check for missing future annotations
"FA102",
# bare except statements
"E722",
# unused arguments
Expand All @@ -194,6 +250,8 @@ unfixable = [
"T203",
]

extend-safe-fixes = ["FA102"]

[tool.ruff.lint.flake8-tidy-imports.banned-api]
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"

Expand Down
Loading