Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9e14c8a
chore(internal): update pydantic dependency
stainless-app[bot] Dec 17, 2025
acd07c4
chore(types): change optional parameter type from NotGiven to Omit
stainless-app[bot] Sep 19, 2025
053b9e4
chore: do not install brew dependencies in ./scripts/bootstrap by def…
stainless-app[bot] Sep 20, 2025
ff91ea8
chore(internal): version bump
stainless-app[bot] Dec 17, 2025
c10fa5d
chore(internal): version bump
stainless-app[bot] Dec 17, 2025
d18a7f9
codegen metadata
stainless-app[bot] Sep 29, 2025
24913b7
codegen metadata
stainless-app[bot] Sep 30, 2025
db2fa45
codegen metadata
stainless-app[bot] Sep 30, 2025
7704619
codegen metadata
stainless-app[bot] Sep 30, 2025
de2fd5b
codegen metadata
stainless-app[bot] Oct 2, 2025
b778406
chore(internal): detect missing future annotations with ruff
stainless-app[bot] Oct 11, 2025
a8d04ae
chore: bump `httpx-aiohttp` version to 0.1.9
stainless-app[bot] Oct 18, 2025
7a554fd
feat(api): api update
stainless-app[bot] Oct 22, 2025
f53fab3
feat(api): api update
stainless-app[bot] Oct 28, 2025
178a48f
fix(client): close streams without requiring full consumption
stainless-app[bot] Oct 30, 2025
41ae1b6
chore(internal/tests): avoid race condition with implicit client cleanup
stainless-app[bot] Oct 31, 2025
65edc47
chore(internal): grammar fix (it's -> its)
stainless-app[bot] Nov 4, 2025
d3d0f8f
chore(package): drop Python 3.8 support
stainless-app[bot] Nov 11, 2025
9a18d6e
fix: compat with Python 3.14
stainless-app[bot] Nov 11, 2025
9e8ffab
release: 0.12.0
stainless-app[bot] Dec 17, 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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.11.4"
".": "0.12.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 18
openapi_spec_hash: 153617b7252b1b12f21043b2a1246f8b
config_hash: 30422a4611d93ca69e4f1aff60b9ddb5
openapi_spec_hash: 539798fac79a1eeebf9ac4faa0492455
config_hash: 6dcf08c4324405f152d1da9fc11ab04a
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 0.12.0 (2025-12-17)

Full Changelog: [v0.11.4...v0.12.0](https://github.com/openlayer-ai/openlayer-python/compare/v0.11.4...v0.12.0)

### Features

* **api:** api update ([f53fab3](https://github.com/openlayer-ai/openlayer-python/commit/f53fab30c1d6404e144e2c862a66f9e08086480a))
* **api:** api update ([7a554fd](https://github.com/openlayer-ai/openlayer-python/commit/7a554fd1301aba3f8c58039780414b86f835d06a))


### Bug Fixes

* **client:** close streams without requiring full consumption ([178a48f](https://github.com/openlayer-ai/openlayer-python/commit/178a48fc44b1bc35d11ffb72f81e5b6a2c761c89))
* compat with Python 3.14 ([9a18d6e](https://github.com/openlayer-ai/openlayer-python/commit/9a18d6ee1df7d00210243b81643d05a509d94a96))


### Chores

* bump `httpx-aiohttp` version to 0.1.9 ([a8d04ae](https://github.com/openlayer-ai/openlayer-python/commit/a8d04ae6242bdaad9651ffbaa537b217f4eeaba8))
* do not install brew dependencies in ./scripts/bootstrap by default ([053b9e4](https://github.com/openlayer-ai/openlayer-python/commit/053b9e409d5bb48aafb1641d292d4105eccd0e76))
* **internal/tests:** avoid race condition with implicit client cleanup ([41ae1b6](https://github.com/openlayer-ai/openlayer-python/commit/41ae1b64f85a1ff8878e43bb872904b93acfd23d))
* **internal:** detect missing future annotations with ruff ([b778406](https://github.com/openlayer-ai/openlayer-python/commit/b778406f38812d00cd770717fdf518725c935582))
* **internal:** grammar fix (it's -> its) ([65edc47](https://github.com/openlayer-ai/openlayer-python/commit/65edc47c162f3e545c463f24ce5bb75769a69aae))
* **internal:** update pydantic dependency ([9e14c8a](https://github.com/openlayer-ai/openlayer-python/commit/9e14c8a69c179bc43c417856455db3854065ccdf))
* **internal:** version bump ([c10fa5d](https://github.com/openlayer-ai/openlayer-python/commit/c10fa5d7d549b2c23865e1c22ff08760ceab6324))
* **internal:** version bump ([ff91ea8](https://github.com/openlayer-ai/openlayer-python/commit/ff91ea81a82a9ffb96946ecfe78c7177783dbaa7))
* **package:** drop Python 3.8 support ([d3d0f8f](https://github.com/openlayer-ai/openlayer-python/commit/d3d0f8fd5d001bac3c6db1cb87a02030049c7fec))
* **types:** change optional parameter type from NotGiven to Omit ([acd07c4](https://github.com/openlayer-ai/openlayer-python/commit/acd07c48b6414194749c13fbe79162bd438c31e2))

## 0.11.4 (2025-12-17)

Full Changelog: [v0.11.3...v0.11.4](https://github.com/openlayer-ai/openlayer-python/compare/v0.11.3...v0.11.4)
Expand Down
4 changes: 2 additions & 2 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/openlayer.svg?label=pypi%20(stable))](https://pypi.org/project/openlayer/)

The Openlayer Python library provides convenient access to the Openlayer REST API from any Python 3.8+
The Openlayer Python library provides convenient access to the Openlayer 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 @@ -515,7 +515,7 @@ print(openlayer.__version__)

## Requirements

Python 3.8 or higher.
Python 3.9 or higher.

## Contributing

Expand Down
13 changes: 8 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openlayer"
version = "0.11.4"
version = "0.12.0"
description = "The official Python library for the openlayer API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand All @@ -22,11 +22,10 @@ dependencies = [
"tqdm",
"wrapt>=1.14.0"
]
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",
Expand All @@ -46,7 +45,7 @@ Homepage = "https://github.com/openlayer-ai/openlayer-python"
Repository = "https://github.com/openlayer-ai/openlayer-python"

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

[tool.rye]
managed = true
Expand Down Expand Up @@ -148,7 +147,7 @@ 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",
Expand Down Expand Up @@ -233,6 +232,8 @@ select = [
"B",
# remove unused imports
"F401",
# check for missing future annotations
"FA102",
# bare except statements
"E722",
# unused arguments
Expand All @@ -255,6 +256,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
11 changes: 6 additions & 5 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ httpx==0.28.1
# via httpx-aiohttp
# via openlayer
# via respx
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via openlayer
idna==3.4
# via anyio
Expand Down Expand Up @@ -96,11 +96,9 @@ pluggy==1.5.0
propcache==0.3.2
# via aiohttp
# via yarl
pyarrow==15.0.2
pydantic==2.11.9
# via openlayer
pydantic==2.10.3
# via openlayer
pydantic-core==2.27.1
pydantic-core==2.33.2
# via pydantic
pygments==2.18.0
# via rich
Expand Down Expand Up @@ -146,6 +144,9 @@ typing-extensions==4.12.2
# via pydantic
# via pydantic-core
# via pyright
# via typing-inspection
typing-inspection==0.4.1
# via pydantic
tzdata==2024.1
# via pandas
urllib3==2.2.3
Expand Down
12 changes: 7 additions & 5 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ httpcore==1.0.9
httpx==0.28.1
# via httpx-aiohttp
# via openlayer
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via openlayer
idna==3.4
# via anyio
Expand All @@ -63,11 +63,9 @@ pandas==2.2.2
propcache==0.3.2
# via aiohttp
# via yarl
pyarrow==15.0.2
pydantic==2.11.9
# via openlayer
pydantic==2.10.3
# via openlayer
pydantic-core==2.27.1
pydantic-core==2.33.2
# via pydantic
python-dateutil==2.9.0.post0
# via pandas
Expand All @@ -92,6 +90,10 @@ typing-extensions==4.12.2
# via openlayer
# via pydantic
# via pydantic-core
# via typing-inspection
typing-inspection==0.4.1
# via pydantic
yarl==1.20.0
tzdata==2024.1
# via pandas
urllib3==2.2.3
Expand Down
14 changes: 11 additions & 3 deletions scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ set -e

cd "$(dirname "$0")/.."

if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
echo "==> Installing Homebrew dependencies…"
brew bundle
echo -n "==> Install Homebrew dependencies? (y/N): "
read -r response
case "$response" in
[yY][eE][sS]|[yY])
brew bundle
;;
*)
;;
esac
echo
}
fi

Expand Down
4 changes: 3 additions & 1 deletion src/openlayer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import typing as _t

from . import types
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
from ._utils import file_from_path
from ._client import (
Client,
Expand Down Expand Up @@ -48,7 +48,9 @@
"ProxiesTypes",
"NotGiven",
"NOT_GIVEN",
"not_given",
"Omit",
"omit",
"OpenlayerError",
"APIError",
"APIStatusError",
Expand Down
18 changes: 9 additions & 9 deletions src/openlayer/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
from ._qs import Querystring
from ._files import to_httpx_files, async_to_httpx_files
from ._types import (
NOT_GIVEN,
Body,
Omit,
Query,
Expand All @@ -57,6 +56,7 @@
RequestOptions,
HttpxRequestFiles,
ModelBuilderProtocol,
not_given,
)
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
from ._compat import PYDANTIC_V1, model_copy, model_dump
Expand Down Expand Up @@ -145,9 +145,9 @@ def __init__(
def __init__(
self,
*,
url: URL | NotGiven = NOT_GIVEN,
json: Body | NotGiven = NOT_GIVEN,
params: Query | NotGiven = NOT_GIVEN,
url: URL | NotGiven = not_given,
json: Body | NotGiven = not_given,
params: Query | NotGiven = not_given,
) -> None:
self.url = url
self.json = json
Expand Down Expand Up @@ -595,7 +595,7 @@ def _maybe_override_cast_to(self, cast_to: type[ResponseT], options: FinalReques
# we internally support defining a temporary header to override the
# default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response`
# see _response.py for implementation details
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, NOT_GIVEN)
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given)
if is_given(override_cast_to):
options.headers = headers
return cast(Type[ResponseT], override_cast_to)
Expand Down Expand Up @@ -825,7 +825,7 @@ def __init__(
version: str,
base_url: str | URL,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.Client | None = None,
custom_headers: Mapping[str, str] | None = None,
custom_query: Mapping[str, object] | None = None,
Expand Down Expand Up @@ -1356,7 +1356,7 @@ def __init__(
base_url: str | URL,
_strict_response_validation: bool,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.AsyncClient | None = None,
custom_headers: Mapping[str, str] | None = None,
custom_query: Mapping[str, object] | None = None,
Expand Down Expand Up @@ -1818,8 +1818,8 @@ def make_request_options(
extra_query: Query | None = None,
extra_body: Body | None = None,
idempotency_key: str | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
post_parser: PostParser | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
post_parser: PostParser | NotGiven = not_given,
) -> RequestOptions:
"""Create a dict of type RequestOptions without keys of NotGiven values."""
options: RequestOptions = {}
Expand Down
16 changes: 8 additions & 8 deletions src/openlayer/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
from __future__ import annotations

import os
from typing import Any, Union, Mapping
from typing import Any, Mapping
from typing_extensions import Self, override

import httpx

from . import _exceptions
from ._qs import Querystring
from ._types import (
NOT_GIVEN,
Omit,
Headers,
Timeout,
NotGiven,
Transport,
ProxiesTypes,
RequestOptions,
not_given,
)
from ._utils import is_given, get_async_library
from ._version import __version__
Expand Down Expand Up @@ -62,7 +62,7 @@ def __init__(
*,
api_key: str | None = None,
base_url: str | httpx.URL | None = None,
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
Expand Down Expand Up @@ -149,9 +149,9 @@ def copy(
*,
api_key: str | None = None,
base_url: str | httpx.URL | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.Client | None = None,
max_retries: int | NotGiven = NOT_GIVEN,
max_retries: int | NotGiven = not_given,
default_headers: Mapping[str, str] | None = None,
set_default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
Expand Down Expand Up @@ -245,7 +245,7 @@ def __init__(
*,
api_key: str | None = None,
base_url: str | httpx.URL | None = None,
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
Expand Down Expand Up @@ -332,9 +332,9 @@ def copy(
*,
api_key: str | None = None,
base_url: str | httpx.URL | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.AsyncClient | None = None,
max_retries: int | NotGiven = NOT_GIVEN,
max_retries: int | NotGiven = not_given,
default_headers: Mapping[str, str] | None = None,
set_default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
Expand Down
Loading
Loading