You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***ci:** release-doctor — report correct token name ([e42727c](https://github.com/openlayer-ai/openlayer-python/commit/e42727caf8c7ac350874d9195487da19df7f0081))
25
+
* context list handling ([#474](https://github.com/openlayer-ai/openlayer-python/issues/474)) ([1ef1a1e](https://github.com/openlayer-ai/openlayer-python/commit/1ef1a1e917675646ec62275101d19e595ba6c2cf))
26
+
***tests:** fix: tests which call HTTP endpoints directly with the example parameters ([ab7ef6b](https://github.com/openlayer-ai/openlayer-python/commit/ab7ef6b12437afc6bc07b1839cdd5fb70d4c3628))
27
+
* update pyarrow version ([f4feadf](https://github.com/openlayer-ai/openlayer-python/commit/f4feadfa95a07a71d79b6184795e79c44644947b))
28
+
29
+
30
+
### Chores
31
+
32
+
***ci:** change upload type ([49cdc9c](https://github.com/openlayer-ai/openlayer-python/commit/49cdc9c1c246051fcd78722eab8896fc3398a555))
33
+
***ci:** enable for pull requests ([07c86b5](https://github.com/openlayer-ai/openlayer-python/commit/07c86b5080d0c910e373b6f50b966ea56794e734))
34
+
***ci:** only run for pushes and fork pull requests ([fbf9c05](https://github.com/openlayer-ai/openlayer-python/commit/fbf9c05081172a447968c7c4ed011a364239ac7a))
35
+
***internal:** bump pinned h11 dep ([ddef8c8](https://github.com/openlayer-ai/openlayer-python/commit/ddef8c848fd1abb9a884b6fa0a42b5e9f2be0412))
36
+
***internal:** codegen related update ([f514ca3](https://github.com/openlayer-ai/openlayer-python/commit/f514ca32ebd1068d9b91b85d1788de560da14a08))
***package:** mark python 3.13 as supported ([e663ce9](https://github.com/openlayer-ai/openlayer-python/commit/e663ce9a6b27739878efac099e0c253cc616190c))
* remove unused imports, break long lines, and formatting cleanup ([753c317](https://github.com/openlayer-ai/openlayer-python/commit/753c31705958f2c16ed27092e33f97aa87854230))
42
+
***tests:** add tests for httpx client instantiation & proxies ([55a2e38](https://github.com/openlayer-ai/openlayer-python/commit/55a2e38b32dd755ac27b36c7b1ebffe0ef41d3f2))
43
+
***tests:** skip some failing tests on the latest python versions ([ef12a3a](https://github.com/openlayer-ai/openlayer-python/commit/ef12a3a6487d67e0add70f168a5954fb49c0f47b))
The Openlayer Python library provides convenient access to the Openlayer REST API from any Python 3.8+
6
6
application. The library includes type definitions for all request params and response fields,
@@ -100,6 +100,56 @@ asyncio.run(main())
100
100
101
101
Functionality between the synchronous and asynchronous clients is otherwise identical.
102
102
103
+
### With aiohttp
104
+
105
+
By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
106
+
107
+
You can enable this by installing `aiohttp`:
108
+
109
+
```sh
110
+
# install from PyPI
111
+
pip install --pre openlayer[aiohttp]
112
+
```
113
+
114
+
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
115
+
116
+
```python
117
+
import os
118
+
import asyncio
119
+
from openlayer import DefaultAioHttpClient
120
+
from openlayer import AsyncOpenlayer
121
+
122
+
123
+
asyncdefmain() -> None:
124
+
asyncwith AsyncOpenlayer(
125
+
api_key=os.environ.get("OPENLAYER_API_KEY"), # This is the default and can be omitted
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:
0 commit comments