Skip to content

Commit cca8639

Browse files
committed
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.543.1
1 parent e032db2 commit cca8639

File tree

159 files changed

+1473
-649
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+1473
-649
lines changed

.speakeasy/workflow.lock

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
speakeasyVersion: 1.541.2
2-
sources: {}
1+
speakeasyVersion: 1.543.1
2+
sources:
3+
Outpost API:
4+
sourceNamespace: outpost-api
5+
sourceRevisionDigest: sha256:a4fdcfe289a2e981c88c788be99b306751d0449d2e1aa76a6de3498f5559964c
6+
sourceBlobDigest: sha256:a10a816abada79cb73fc22c859e5ea890870e42dce925fafd67710978d756693
7+
tags:
8+
- latest
9+
- speakeasy-sdk-regen-1746795251
10+
- 0.0.1
311
targets:
412
outpost-go:
513
source: Outpost API
614
outpost-python:
715
source: Outpost API
16+
sourceNamespace: outpost-api
17+
sourceRevisionDigest: sha256:a4fdcfe289a2e981c88c788be99b306751d0449d2e1aa76a6de3498f5559964c
18+
sourceBlobDigest: sha256:a10a816abada79cb73fc22c859e5ea890870e42dce925fafd67710978d756693
19+
codeSamplesNamespace: outpost-api-python-code-samples
20+
codeSamplesRevisionDigest: sha256:27069f573d06905336ec09c42ffaa4efaf11dac3242051bdc27c36e6bf42d156
821
outpost-ts:
922
source: Outpost API
1023
workflow:
@@ -13,7 +26,7 @@ workflow:
1326
sources:
1427
Outpost API:
1528
inputs:
16-
- location: ./sdks/schemas/hookdeck-schema.yaml
29+
- location: ./docs/apis/openapi.yaml
1730
overlays:
1831
- location: ./sdks/schemas/speakeasy-modifications-overlay.yaml
1932
- location: ./sdks/schemas/error-types.yaml
@@ -34,6 +47,9 @@ workflow:
3447
target: python
3548
source: Outpost API
3649
output: ./sdks/python
50+
publish:
51+
pypi:
52+
token: $pypi_token
3753
codeSamples:
3854
registry:
3955
location: registry.speakeasyapi.dev/hookdeck-dev/outpost/outpost-api-python-code-samples
@@ -44,6 +60,9 @@ workflow:
4460
target: typescript
4561
source: Outpost API
4662
output: ./sdks/typescript
63+
publish:
64+
npm:
65+
token: $npm_token
4766
codeSamples:
4867
registry:
4968
location: registry.speakeasyapi.dev/hookdeck-dev/outpost/outpost-api-typescript-code-samples

sdks/python/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
**/__pycache__/
12
.venv/
23
venv/
34
src/*.egg-info/

sdks/python/.speakeasy/gen.lock

Lines changed: 139 additions & 115 deletions
Large diffs are not rendered by default.

sdks/python/.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ generation:
1616
oAuth2ClientCredentialsEnabled: true
1717
oAuth2PasswordEnabled: true
1818
python:
19-
version: 0.0.1
19+
version: 0.1.0
2020
additionalDependencies:
2121
dev: {}
2222
main: {}

sdks/python/README.md

Lines changed: 51 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ Outpost API: The Outpost API is a REST-based JSON API for managing tenants, dest
4545
<!-- Start SDK Installation [installation] -->
4646
## SDK Installation
4747

48-
> [!TIP]
49-
> To finish publishing your SDK to PyPI you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).
50-
51-
5248
> [!NOTE]
5349
> **Python version upgrade policy**
5450
>
@@ -61,23 +57,23 @@ The SDK can be installed with either *pip* or *poetry* package managers.
6157
*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
6258

6359
```bash
64-
pip install git+<UNSET>.git
60+
pip install outpost_sdk
6561
```
6662

6763
### Poetry
6864

6965
*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
7066

7167
```bash
72-
poetry add git+<UNSET>.git
68+
poetry add outpost_sdk
7369
```
7470

7571
### Shell and script usage with `uv`
7672

7773
You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so:
7874

7975
```shell
80-
uvx --from openapi python
76+
uvx --from outpost_sdk python
8177
```
8278

8379
It's also possible to write a standalone Python script without needing to set up a whole project like so:
@@ -87,13 +83,13 @@ It's also possible to write a standalone Python script without needing to set up
8783
# /// script
8884
# requires-python = ">=3.9"
8985
# dependencies = [
90-
# "openapi",
86+
# "outpost_sdk",
9187
# ]
9288
# ///
9389

94-
from openapi import SDK
90+
from outpost_sdk import Outpost
9591

96-
sdk = SDK(
92+
sdk = Outpost(
9793
# SDK arguments
9894
)
9995

@@ -121,14 +117,12 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
121117

122118
```python
123119
# Synchronous Example
124-
from openapi import SDK
120+
from outpost_sdk import Outpost
125121

126122

127-
with SDK(
128-
admin_api_key="<YOUR_BEARER_TOKEN_HERE>",
129-
) as sdk:
123+
with Outpost() as outpost:
130124

131-
res = sdk.health.check()
125+
res = outpost.health.check()
132126

133127
# Handle response
134128
print(res)
@@ -140,15 +134,13 @@ The same SDK client can also be used to make asychronous requests by importing a
140134
```python
141135
# Asynchronous Example
142136
import asyncio
143-
from openapi import SDK
137+
from outpost_sdk import Outpost
144138

145139
async def main():
146140

147-
async with SDK(
148-
admin_api_key="<YOUR_BEARER_TOKEN_HERE>",
149-
) as sdk:
141+
async with Outpost() as outpost:
150142

151-
res = await sdk.health.check_async()
143+
res = await outpost.health.check_async()
152144

153145
# Handle response
154146
print(res)
@@ -170,14 +162,14 @@ This SDK supports the following security scheme globally:
170162

171163
To authenticate with the API the `admin_api_key` parameter must be set when initializing the SDK client instance. For example:
172164
```python
173-
from openapi import SDK
165+
from outpost_sdk import Outpost
174166

175167

176-
with SDK(
168+
with Outpost(
177169
admin_api_key="<YOUR_BEARER_TOKEN_HERE>",
178-
) as sdk:
170+
) as outpost:
179171

180-
res = sdk.health.check()
172+
res = outpost.health.check()
181173

182174
# Handle response
183175
print(res)
@@ -188,12 +180,12 @@ with SDK(
188180

189181
Some operations in this SDK require the security scheme to be specified at the request level. For example:
190182
```python
191-
from openapi import SDK, models
183+
from outpost_sdk import Outpost, models
192184

193185

194-
with SDK() as sdk:
186+
with Outpost() as outpost:
195187

196-
res = sdk.tenants.get(security=models.GetTenantSecurity(
188+
res = outpost.tenants.get(security=models.GetTenantSecurity(
197189

198190
), tenant_id="<id>")
199191

@@ -232,6 +224,7 @@ with SDK() as sdk:
232224

233225
* [check](docs/sdks/health/README.md#check) - Health Check
234226

227+
235228
### [publish](docs/sdks/publish/README.md)
236229

237230
* [event](docs/sdks/publish/README.md#event) - Publish Event
@@ -243,7 +236,6 @@ with SDK() as sdk:
243236
* [list_destination_types_jwt](docs/sdks/schemas/README.md#list_destination_types_jwt) - List Destination Type Schemas (JWT Auth)
244237
* [get_destination_type_jwt](docs/sdks/schemas/README.md#get_destination_type_jwt) - Get Destination Type Schema (JWT Auth)
245238

246-
247239
### [tenants](docs/sdks/tenants/README.md)
248240

249241
* [upsert](docs/sdks/tenants/README.md#upsert) - Create or Update Tenant
@@ -281,14 +273,14 @@ The following global parameter is available.
281273
### Example
282274

283275
```python
284-
from openapi import SDK
276+
from outpost_sdk import Outpost
285277

286278

287-
with SDK(
279+
with Outpost(
288280
admin_api_key="<YOUR_BEARER_TOKEN_HERE>",
289-
) as sdk:
281+
) as outpost:
290282

291-
res = sdk.tenants.upsert(tenant_id="<id>")
283+
res = outpost.tenants.upsert(tenant_id="<id>")
292284

293285
# Handle response
294286
print(res)
@@ -303,15 +295,13 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an
303295

304296
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
305297
```python
306-
from openapi import SDK
307-
from openapi.utils import BackoffStrategy, RetryConfig
298+
from outpost_sdk import Outpost
299+
from outpost_sdk.utils import BackoffStrategy, RetryConfig
308300

309301

310-
with SDK(
311-
admin_api_key="<YOUR_BEARER_TOKEN_HERE>",
312-
) as sdk:
302+
with Outpost() as outpost:
313303

314-
res = sdk.health.check(,
304+
res = outpost.health.check(,
315305
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
316306

317307
# Handle response
@@ -321,16 +311,15 @@ with SDK(
321311

322312
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
323313
```python
324-
from openapi import SDK
325-
from openapi.utils import BackoffStrategy, RetryConfig
314+
from outpost_sdk import Outpost
315+
from outpost_sdk.utils import BackoffStrategy, RetryConfig
326316

327317

328-
with SDK(
318+
with Outpost(
329319
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
330-
admin_api_key="<YOUR_BEARER_TOKEN_HERE>",
331-
) as sdk:
320+
) as outpost:
332321

333-
res = sdk.health.check()
322+
res = outpost.health.check()
334323

335324
# Handle response
336325
print(res)
@@ -371,16 +360,14 @@ When custom error responses are specified for an operation, the SDK may also rai
371360
### Example
372361

373362
```python
374-
from openapi import SDK, errors
363+
from outpost_sdk import Outpost, errors
375364

376365

377-
with SDK(
378-
admin_api_key="<YOUR_BEARER_TOKEN_HERE>",
379-
) as sdk:
366+
with Outpost() as outpost:
380367
res = None
381368
try:
382369

383-
res = sdk.health.check()
370+
res = outpost.health.check()
384371

385372
# Handle response
386373
print(res)
@@ -428,15 +415,14 @@ with SDK(
428415

429416
The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
430417
```python
431-
from openapi import SDK
418+
from outpost_sdk import Outpost
432419

433420

434-
with SDK(
421+
with Outpost(
435422
server_url="http://localhost:3333/api/v1",
436-
admin_api_key="<YOUR_BEARER_TOKEN_HERE>",
437-
) as sdk:
423+
) as outpost:
438424

439-
res = sdk.health.check()
425+
res = outpost.health.check()
440426

441427
# Handle response
442428
print(res)
@@ -453,17 +439,17 @@ This allows you to wrap the client with your own custom logic, such as adding cu
453439

454440
For example, you could specify a header for every request that this sdk makes as follows:
455441
```python
456-
from openapi import SDK
442+
from outpost_sdk import Outpost
457443
import httpx
458444

459445
http_client = httpx.Client(headers={"x-custom-header": "someValue"})
460-
s = SDK(client=http_client)
446+
s = Outpost(client=http_client)
461447
```
462448

463449
or you could wrap the client with your own custom logic:
464450
```python
465-
from openapi import SDK
466-
from openapi.httpclient import AsyncHttpClient
451+
from outpost_sdk import Outpost
452+
from outpost_sdk.httpclient import AsyncHttpClient
467453
import httpx
468454

469455
class CustomClient(AsyncHttpClient):
@@ -521,33 +507,29 @@ class CustomClient(AsyncHttpClient):
521507
extensions=extensions,
522508
)
523509

524-
s = SDK(async_client=CustomClient(httpx.AsyncClient()))
510+
s = Outpost(async_client=CustomClient(httpx.AsyncClient()))
525511
```
526512
<!-- End Custom HTTP Client [http-client] -->
527513

528514
<!-- Start Resource Management [resource-management] -->
529515
## Resource Management
530516

531-
The `SDK` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
517+
The `Outpost` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
532518

533519
[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
534520

535521
```python
536-
from openapi import SDK
522+
from outpost_sdk import Outpost
537523
def main():
538524

539-
with SDK(
540-
admin_api_key="<YOUR_BEARER_TOKEN_HERE>",
541-
) as sdk:
525+
with Outpost() as outpost:
542526
# Rest of application here...
543527

544528

545529
# Or when using async:
546530
async def amain():
547531

548-
async with SDK(
549-
admin_api_key="<YOUR_BEARER_TOKEN_HERE>",
550-
) as sdk:
532+
async with Outpost() as outpost:
551533
# Rest of application here...
552534
```
553535
<!-- End Resource Management [resource-management] -->
@@ -559,11 +541,11 @@ You can setup your SDK to emit debug logs for SDK requests and responses.
559541

560542
You can pass your own logger class directly into your SDK.
561543
```python
562-
from openapi import SDK
544+
from outpost_sdk import Outpost
563545
import logging
564546

565547
logging.basicConfig(level=logging.DEBUG)
566-
s = SDK(debug_logger=logging.getLogger("openapi"))
548+
s = Outpost(debug_logger=logging.getLogger("outpost_sdk"))
567549
```
568550
<!-- End Debugging [debug] -->
569551

0 commit comments

Comments
 (0)