Skip to content

Commit 1d08b84

Browse files
committed
ci: regenerated with OpenAPI Doc 0.4.0, Speakeasy CLI 1.207.1
1 parent 4fab3bc commit 1d08b84

File tree

6 files changed

+47
-26
lines changed

6 files changed

+47
-26
lines changed

.speakeasy/gen.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ id: b0b519b1-d1d3-43b2-82dd-b4292eadd4b0
33
management:
44
docChecksum: 3d1ffb0cc7307a0362c5389c0fa1fdb5
55
docVersion: 0.4.0
6-
speakeasyVersion: 1.205.2
7-
generationVersion: 2.279.1
8-
releaseVersion: 5.4.1
9-
configChecksum: 9cbfe1a8a286349bca006f3be62f3681
6+
speakeasyVersion: 1.207.1
7+
generationVersion: 2.280.6
8+
releaseVersion: 5.4.2
9+
configChecksum: a976d8241daf5ce93ba1c8e2be1c6b4f
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
@@ -17,7 +17,7 @@ features:
1717
downloadStreams: 0.0.2
1818
examples: 2.81.3
1919
globalSecurity: 2.83.4
20-
globalServerURLs: 2.82.1
20+
globalServerURLs: 2.82.2
2121
globals: 2.81.1
2222
inputOutputModels: 2.83.1
2323
responseFormat: 0.1.0

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,4 +1336,14 @@ Based on:
13361336
### Generated
13371337
- [python v5.4.1] .
13381338
### Releases
1339-
- [PyPI v5.4.1] https://pypi.org/project/speakeasy-client-sdk-python/5.4.1 - .
1339+
- [PyPI v5.4.1] https://pypi.org/project/speakeasy-client-sdk-python/5.4.1 - .
1340+
1341+
## 2024-03-13 00:10:17
1342+
### Changes
1343+
Based on:
1344+
- OpenAPI Doc 0.4.0 https://docs.speakeasyapi.dev/openapi.yaml
1345+
- Speakeasy CLI 1.207.1 (2.280.6) https://github.com/speakeasy-api/speakeasy
1346+
### Generated
1347+
- [python v5.4.2] .
1348+
### Releases
1349+
- [PyPI v5.4.2] https://pypi.org/project/speakeasy-client-sdk-python/5.4.2 - .

gen.yaml

Lines changed: 1 addition & 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.4.1
13+
version: 5.4.2
1414
additionalDependencies:
1515
dependencies: {}
1616
extraDependencies:

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="5.4.1",
13+
version="5.4.2",
1414
author="Speakeasy",
1515
description="Speakeasy API Client SDK for Python",
1616
long_description=long_description,

src/speakeasy/sdk.py

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from speakeasy import utils
1515
from speakeasy._hooks import SDKHooks
1616
from speakeasy.models import shared
17-
from typing import Callable, Dict, Union
17+
from typing import Callable, Dict, Optional, Union
1818

1919
class Speakeasy:
2020
r"""Speakeasy API: The Speakeasy API allows teams to manage common operations with their APIs
@@ -43,14 +43,14 @@ class Speakeasy:
4343
def __init__(self,
4444
security: Union[shared.Security,Callable[[], shared.Security]] = None,
4545
workspace_id: str = None,
46-
server: str = None,
47-
server_url: str = None,
48-
url_params: Dict[str, str] = None,
49-
client: requests_http.Session = None,
50-
retry_config: utils.RetryConfig = None
46+
server: Optional[str] = None,
47+
server_url: Optional[str] = None,
48+
url_params: Optional[Dict[str, str]] = None,
49+
client: Optional[requests_http.Session] = None,
50+
retry_config: Optional[utils.RetryConfig] = None
5151
) -> None:
5252
"""Instantiates the SDK configuring it with the provided parameters.
53-
53+
5454
:param security: The security details required for authentication
5555
:type security: Union[shared.Security,Callable[[], shared.Security]]
5656
:param workspace_id: Configures the workspace_id parameter for all supported operations
@@ -68,20 +68,28 @@ def __init__(self,
6868
"""
6969
if client is None:
7070
client = requests_http.Session()
71-
71+
7272
if server_url is not None:
7373
if url_params is not None:
7474
server_url = utils.template_url(server_url, url_params)
75-
76-
self.sdk_configuration = SDKConfiguration(client, security, server_url, server, {
75+
global_params = {
7776
'parameters': {
7877
'queryParam': {
7978
},
8079
'pathParam': {
8180
'workspace_id': workspace_id,
8281
},
8382
},
84-
}, retry_config=retry_config)
83+
}
84+
85+
self.sdk_configuration = SDKConfiguration(
86+
client,
87+
security,
88+
server_url,
89+
server,
90+
global_params,
91+
retry_config=retry_config
92+
)
8593

8694
hooks = SDKHooks()
8795

@@ -91,10 +99,11 @@ def __init__(self,
9199
self.sdk_configuration.server_url = server_url
92100

93101
# pylint: disable=protected-access
94-
self.sdk_configuration._hooks=hooks
95-
102+
self.sdk_configuration._hooks = hooks
103+
96104
self._init_sdks()
97-
105+
106+
98107
def _init_sdks(self):
99108
self.apis = Apis(self.sdk_configuration)
100109
self.api_endpoints = APIEndpoints(self.sdk_configuration)
@@ -105,4 +114,3 @@ def _init_sdks(self):
105114
self.organizations = Organizations(self.sdk_configuration)
106115
self.embeds = Embeds(self.sdk_configuration)
107116
self.events = Events(self.sdk_configuration)
108-

src/speakeasy/sdkconfiguration.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ class SDKConfiguration:
2626
globals: Dict[str, Dict[str, Dict[str, Any]]] = field(default_factory=Dict)
2727
language: str = 'python'
2828
openapi_doc_version: str = '0.4.0'
29-
sdk_version: str = '5.4.1'
30-
gen_version: str = '2.279.1'
31-
user_agent: str = 'speakeasy-sdk/python 5.4.1 2.279.1 0.4.0 speakeasy-client-sdk-python'
29+
sdk_version: str = '5.4.2'
30+
gen_version: str = '2.280.6'
31+
user_agent: str = 'speakeasy-sdk/python 5.4.2 2.280.6 0.4.0 speakeasy-client-sdk-python'
3232
retry_config: RetryConfig = None
3333
_hooks: SDKHooks = None
3434

@@ -38,6 +38,9 @@ def get_server_details(self) -> Tuple[str, Dict[str, str]]:
3838
if not self.server:
3939
self.server = SERVER_PROD
4040

41+
if not self.server in SERVERS:
42+
raise ValueError(f"Invalid server \"{self.server}\"")
43+
4144
return SERVERS[self.server], {}
4245

4346

0 commit comments

Comments
 (0)