Skip to content

Commit aaf1e75

Browse files
author
Anonymous Committer
committed
Generate high-level Python client from OpenAPI
1 parent c5c20f6 commit aaf1e75

7 files changed

Lines changed: 909 additions & 188 deletions

File tree

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,28 +54,31 @@ with Client(api_key="YOUR_API_KEY") as client:
5454
print(response["data"])
5555
```
5656

57-
## Promoted High-Level API
57+
## Generated High-Level API
5858

59-
The high-level surface is designed to be the default entrypoint:
59+
The high-level surface is generated from OpenAPI and designed to be the default entrypoint:
6060

6161
```python
6262
from justserpapi import Client
6363

6464
client = Client(api_key="YOUR_API_KEY", timeout=20.0)
6565

6666
search = client.google.search(query="best espresso beans", language="en")
67+
light = client.google.search.light(query="best espresso beans", language="en")
6768
maps = client.google.maps.search(query="espresso bars", location="Shanghai")
6869
news = client.google.news.search(query="OpenAI", language="en")
6970
images = client.google.images.search(query="espresso machine")
7071
shopping = client.google.shopping.search(query="espresso tamper")
72+
finance = client.google.finance.search(query="NASDAQ:GOOGL")
73+
scholar = client.google.scholar.search(query="machine learning", language="en")
7174
overview = client.google.ai.overview(url="https://example.com/ai-overview")
7275

7376
print(search["data"])
7477

7578
client.close()
7679
```
7780

78-
Promoted high-level responses are plain Python dictionaries that mirror the API's JSON response envelope. The SDK does not auto-unpack `data`.
81+
High-level responses are plain Python dictionaries that mirror the API's JSON response envelope. The SDK does not auto-unpack `data`.
7982

8083
## Configuration
8184

@@ -96,7 +99,7 @@ client.close()
9699

97100
- `api_key`: value sent in the `X-API-Key` header
98101
- `base_url`: API host, defaults to `https://api.justserpapi.com`
99-
- `timeout`: default request timeout injected into promoted high-level methods
102+
- `timeout`: default request timeout injected into high-level methods
100103
- `retries`: `urllib3` retry configuration; defaults to a conservative retry strategy for the high-level client
101104

102105
## OpenAPI Control Plane

0 commit comments

Comments
 (0)