Skip to content

Commit 66bc89c

Browse files
committed
ci: regenerated with OpenAPI Doc 0.3.0, Speakeay CLI 1.109.0
1 parent 2bff546 commit 66bc89c

File tree

5 files changed

+112
-9
lines changed

5 files changed

+112
-9
lines changed

README.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,99 @@ return value of `Next` is `None`, then there are no more pages to be fetched.
120120
Here's an example of one such pagination call:
121121
<!-- End Pagination -->
122122

123+
124+
125+
<!-- Start Error Handling -->
126+
# Error Handling
127+
128+
Handling errors in your SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
129+
130+
131+
<!-- End Error Handling -->
132+
133+
134+
135+
<!-- Start Server Selection -->
136+
# Server Selection
137+
138+
## Select Server by Name
139+
140+
You can override the default server globally by passing a server name to the `server: str` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:
141+
142+
| Name | Server | Variables |
143+
| ----- | ------ | --------- |
144+
| `prod` | `https://api.prod.speakeasyapi.dev` | None |
145+
146+
For example:
147+
148+
149+
```python
150+
import speakeasy
151+
from speakeasy.models import shared
152+
153+
s = speakeasy.Speakeasy(
154+
security=shared.Security(
155+
api_key="",
156+
),
157+
server="prod"
158+
)
159+
160+
161+
res = s.speakeasy.validate_api_key()
162+
163+
if res.status_code == 200:
164+
# handle response
165+
pass
166+
```
167+
168+
169+
## Override Server URL Per-Client
170+
171+
The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
172+
173+
174+
```python
175+
import speakeasy
176+
from speakeasy.models import shared
177+
178+
s = speakeasy.Speakeasy(
179+
security=shared.Security(
180+
api_key="",
181+
),
182+
server_url="https://api.prod.speakeasyapi.dev"
183+
)
184+
185+
186+
res = s.speakeasy.validate_api_key()
187+
188+
if res.status_code == 200:
189+
# handle response
190+
pass
191+
```
192+
<!-- End Server Selection -->
193+
194+
195+
196+
<!-- Start Custom HTTP Client -->
197+
# Custom HTTP Client
198+
199+
The Python SDK makes API calls using the (requests)[https://pypi.org/project/requests/] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
200+
201+
202+
For example, you could specify a header for every request that your sdk makes as follows:
203+
204+
```python
205+
import speakeasy
206+
import requests
207+
208+
http_client = requests.Session()
209+
http_client.headers.update({'x-custom-header': 'someValue'})
210+
s = speakeasy.Speakeasy(client: http_client)
211+
```
212+
213+
214+
<!-- End Custom HTTP Client -->
215+
123216
<!-- Placeholder for Future Speakeasy SDK Sections -->
124217

125218

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,4 +1016,14 @@ Based on:
10161016
### Generated
10171017
- [python v2.1.0] .
10181018
### Releases
1019-
- [PyPI v2.1.0] https://pypi.org/project/speakeasy-client-sdk-python/2.1.0 - .
1019+
- [PyPI v2.1.0] https://pypi.org/project/speakeasy-client-sdk-python/2.1.0 - .
1020+
1021+
## 2023-10-28 00:09:49
1022+
### Changes
1023+
Based on:
1024+
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
1025+
- Speakeasy CLI 1.109.0 (2.173.0) https://github.com/speakeasy-api/speakeasy
1026+
### Generated
1027+
- [python v2.1.1] .
1028+
### Releases
1029+
- [PyPI v2.1.1] https://pypi.org/project/speakeasy-client-sdk-python/2.1.1 - .

gen.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ configVersion: 1.0.0
22
management:
33
docChecksum: ba638b2ad28966c596e28321a2003686
44
docVersion: 0.3.0
5-
speakeasyVersion: 1.104.0
6-
generationVersion: 2.169.0
5+
speakeasyVersion: 1.109.0
6+
generationVersion: 2.173.0
77
generation:
88
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-python.git
99
sdkClassName: speakeasy
1010
singleTagPerOp: false
1111
telemetryEnabled: true
1212
features:
1313
python:
14-
core: 3.3.0
14+
core: 3.3.1
1515
downloadStreams: 0.0.2
1616
examples: 2.81.3
1717
globalSecurity: 2.82.0
1818
globalServerURLs: 2.82.0
1919
inputOutputModels: 2.81.1
2020
serverIDs: 2.81.1
2121
python:
22-
version: 2.1.0
22+
version: 2.1.1
2323
author: Speakeasy
2424
description: Speakeasy API Client SDK for Python
2525
flattenGlobalSecurity: false

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setuptools.setup(
1212
name="speakeasy-client-sdk-python",
13-
version="2.1.0",
13+
version="2.1.1",
1414
author="Speakeasy",
1515
description="Speakeasy API Client SDK for Python",
1616
long_description=long_description,

src/speakeasy/sdkconfiguration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class SDKConfiguration:
2222
server: str = ''
2323
language: str = 'python'
2424
openapi_doc_version: str = '0.3.0'
25-
sdk_version: str = '2.1.0'
26-
gen_version: str = '2.169.0'
27-
user_agent: str = 'speakeasy-sdk/python 2.1.0 2.169.0 0.3.0 speakeasy-client-sdk-python'
25+
sdk_version: str = '2.1.1'
26+
gen_version: str = '2.173.0'
27+
user_agent: str = 'speakeasy-sdk/python 2.1.1 2.173.0 0.3.0 speakeasy-client-sdk-python'
2828
retry_config: RetryConfig = None
2929

3030
def get_server_details(self) -> Tuple[str, Dict[str, str]]:

0 commit comments

Comments
 (0)