Skip to content

Commit 9121b25

Browse files
committed
ci: regenerated with OpenAPI Doc 0.4.0, Speakeasy CLI 1.233.1
1 parent 2ae9312 commit 9121b25

20 files changed

+602
-623
lines changed

.speakeasy/gen.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ id: b0b519b1-d1d3-43b2-82dd-b4292eadd4b0
33
management:
44
docChecksum: 17e2e733dfd588a7103c3c70e91b24b5
55
docVersion: 0.4.0
6-
speakeasyVersion: 1.231.1
7-
generationVersion: 2.295.1
8-
releaseVersion: 5.5.1
9-
configChecksum: f59d84dd0b033c2fe4d4ffb68749738b
6+
speakeasyVersion: 1.233.1
7+
generationVersion: 2.296.1
8+
releaseVersion: 5.6.0
9+
configChecksum: 9e1778aea2b2d51dc7adb835b6d193c2
1010
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-python.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/speakeasy-api/speakeasy-client-sdk-python.git
1313
published: true
1414
features:
1515
python:
16-
core: 4.5.2
16+
core: 4.6.0
1717
downloadStreams: 0.0.2
1818
examples: 2.81.3
1919
globalSecurity: 2.83.5

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ import requests
237237

238238
http_client = requests.Session()
239239
http_client.headers.update({'x-custom-header': 'someValue'})
240-
s = speakeasy.Speakeasy(client: http_client)
240+
s = speakeasy.Speakeasy(client=http_client)
241241
```
242242
<!-- End Custom HTTP Client [http-client] -->
243243

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1376,4 +1376,14 @@ Based on:
13761376
### Generated
13771377
- [python v5.5.1] .
13781378
### Releases
1379-
- [PyPI v5.5.1] https://pypi.org/project/speakeasy-client-sdk-python/5.5.1 - .
1379+
- [PyPI v5.5.1] https://pypi.org/project/speakeasy-client-sdk-python/5.5.1 - .
1380+
1381+
## 2024-04-02 14:21:12
1382+
### Changes
1383+
Based on:
1384+
- OpenAPI Doc 0.4.0 https://docs.speakeasyapi.dev/openapi.yaml
1385+
- Speakeasy CLI 1.233.1 (2.296.1) https://github.com/speakeasy-api/speakeasy
1386+
### Generated
1387+
- [python v5.6.0] .
1388+
### Releases
1389+
- [PyPI v5.6.0] https://pypi.org/project/speakeasy-client-sdk-python/5.6.0 - .

gen.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ generation:
1010
auth:
1111
oAuth2ClientCredentialsEnabled: false
1212
python:
13-
version: 5.5.1
13+
version: 5.6.0
1414
additionalDependencies:
1515
dependencies: {}
1616
extraDependencies:
@@ -31,4 +31,5 @@ python:
3131
maxMethodParams: 0
3232
outputModelSuffix: output
3333
packageName: speakeasy-client-sdk-python
34+
projectUrls: {}
3435
responseFormat: envelope

pylintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,8 @@ disable=raw-checker-failed,
444444
too-many-nested-blocks,
445445
too-many-boolean-expressions,
446446
no-else-raise,
447-
bare-except
447+
bare-except,
448+
broad-exception-caught
448449

449450
# Enable the message, report, category or checker with the given id(s). You can
450451
# either give multiple identifier separated by comma (,) or put this option

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010

1111
setuptools.setup(
1212
name="speakeasy-client-sdk-python",
13-
version="5.5.1",
13+
version="5.6.0",
1414
author="Speakeasy",
1515
description="Speakeasy API Client SDK for Python",
16+
url="https://github.com/speakeasy-api/speakeasy-client-sdk-python.git",
1617
long_description=long_description,
1718
long_description_content_type="text/markdown",
1819
packages=setuptools.find_packages(where="src"),

src/speakeasy/_hooks/sdkhooks.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import requests
44
from .types import SDKInitHook, BeforeRequestContext, BeforeRequestHook, AfterSuccessContext, AfterSuccessHook, AfterErrorContext, AfterErrorHook, Hooks
55
from .registration import init_hooks
6-
from typing import List, Optional, Tuple, Union
6+
from typing import List, Optional, Tuple
77

88

99
class SDKHooks(Hooks):
@@ -31,19 +31,21 @@ def sdk_init(self, base_url: str, client: requests.Session) -> Tuple[str, reques
3131
base_url, client = hook.sdk_init(base_url, client)
3232
return base_url, client
3333

34-
def before_request(self, hook_ctx: BeforeRequestContext, request: requests.PreparedRequest) -> Union[requests.PreparedRequest, Exception]:
34+
def before_request(self, hook_ctx: BeforeRequestContext, request: requests.PreparedRequest) -> requests.PreparedRequest:
3535
for hook in self.before_request_hooks:
36-
request = hook.before_request(hook_ctx, request)
37-
if isinstance(request, Exception):
38-
raise request
36+
out = hook.before_request(hook_ctx, request)
37+
if isinstance(out, Exception):
38+
raise out
39+
request = out
3940

4041
return request
4142

4243
def after_success(self, hook_ctx: AfterSuccessContext, response: requests.Response) -> requests.Response:
4344
for hook in self.after_success_hooks:
44-
response = hook.after_success(hook_ctx, response)
45-
if isinstance(response, Exception):
46-
raise response
45+
out = hook.after_success(hook_ctx, response)
46+
if isinstance(out, Exception):
47+
raise out
48+
response = out
4749
return response
4850

4951
def after_error(self, hook_ctx: AfterErrorContext, response: Optional[requests.Response], error: Optional[Exception]) -> Tuple[Optional[requests.Response], Optional[Exception]]:

src/speakeasy/_hooks/types.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,19 @@ def __init__(self, operation_id: str, oauth2_scopes: Optional[List[str]], securi
1717

1818

1919
class BeforeRequestContext(HookContext):
20-
pass
20+
def __init__(self, hook_ctx: HookContext):
21+
super().__init__(hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source)
2122

2223

2324
class AfterSuccessContext(HookContext):
24-
pass
25+
def __init__(self, hook_ctx: HookContext):
26+
super().__init__(hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source)
27+
2528

2629

2730
class AfterErrorContext(HookContext):
28-
pass
31+
def __init__(self, hook_ctx: HookContext):
32+
super().__init__(hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source)
2933

3034

3135
class SDKInitHook(ABC):

0 commit comments

Comments
 (0)