Skip to content

Commit e229b28

Browse files
Merge pull request #18 from gleanwork/speakeasy-sdk-regen-1747525127
chore: 🐝 Update SDK - Generate 0.4.2
2 parents 01372bd + 2ef67b1 commit e229b28

File tree

145 files changed

+453
-892
lines changed

Some content is hidden

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

145 files changed

+453
-892
lines changed

.speakeasy/gen.lock

Lines changed: 20 additions & 19 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ generation:
2424
generateNewTests: true
2525
skipResponseBodyAssertions: true
2626
python:
27-
version: 0.4.1
27+
version: 0.4.2
2828
additionalDependencies:
2929
dev: {}
3030
main: {}

.speakeasy/glean-merged-spec.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ servers:
3232
description: The instance name (typically the email domain without the TLD) that determines the deployment backend.
3333
security:
3434
- APIToken: []
35-
- cookieAuth: []
3635
paths:
3736
/rest/api/v1/activity:
3837
post:

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
speakeasyVersion: 1.546.1
1+
speakeasyVersion: 1.546.2
22
sources:
33
Glean API:
44
sourceNamespace: glean-api-specs
5-
sourceRevisionDigest: sha256:81bbab1ab458be7ad4d3b4e052629504f2dc32e0554426fc4bac347061fad35c
6-
sourceBlobDigest: sha256:f2a2721aa0c1960218fc0a261ef3f689e2e78c399b36b7e6602e6ad8650206ac
5+
sourceRevisionDigest: sha256:d6fa8702a32b71122384445deea1072af1cf22ed50c70ffc25cc87a25fc82612
6+
sourceBlobDigest: sha256:393fd23b9e5d6d5f6929f86557b6b42c770f61271257cd10bc6a364b3ac8b053
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1747427742
9+
- speakeasy-sdk-regen-1747525127
1010
Glean Client API:
1111
sourceNamespace: glean-client-api
1212
sourceRevisionDigest: sha256:4edc63ad559e4f2c9fb9ebf5edaaaaa9269f1874d271cfd84b441d6dacac43d2
@@ -17,10 +17,10 @@ targets:
1717
glean:
1818
source: Glean API
1919
sourceNamespace: glean-api-specs
20-
sourceRevisionDigest: sha256:81bbab1ab458be7ad4d3b4e052629504f2dc32e0554426fc4bac347061fad35c
21-
sourceBlobDigest: sha256:f2a2721aa0c1960218fc0a261ef3f689e2e78c399b36b7e6602e6ad8650206ac
20+
sourceRevisionDigest: sha256:d6fa8702a32b71122384445deea1072af1cf22ed50c70ffc25cc87a25fc82612
21+
sourceBlobDigest: sha256:393fd23b9e5d6d5f6929f86557b6b42c770f61271257cd10bc6a364b3ac8b053
2222
codeSamplesNamespace: glean-api-specs-python-code-samples
23-
codeSamplesRevisionDigest: sha256:77c663e0da7182a41d5bfbf2d40c5c3c5510eaade3541631d7ecacbbb2ec31bd
23+
codeSamplesRevisionDigest: sha256:f98f110acb5e1a433c37aaae9c4c266b24433af86955a9708d22948caf79f6de
2424
workflow:
2525
workflowVersion: 1.0.0
2626
speakeasyVersion: latest

README.md

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,7 @@ import os
141141

142142

143143
with Glean(
144-
security=models.Security(
145-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
146-
),
144+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
147145
) as g_client:
148146

149147
res = g_client.client.chat.create(messages=[
@@ -172,9 +170,7 @@ import os
172170
async def main():
173171

174172
async with Glean(
175-
security=models.Security(
176-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
177-
),
173+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
178174
) as g_client:
179175

180176
res = await g_client.client.chat.create_async(messages=[
@@ -202,9 +198,7 @@ import os
202198

203199

204200
with Glean(
205-
security=models.Security(
206-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
207-
),
201+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
208202
) as g_client:
209203

210204
res = g_client.client.chat.create_stream(messages=[
@@ -233,9 +227,7 @@ import os
233227
async def main():
234228

235229
async with Glean(
236-
security=models.Security(
237-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
238-
),
230+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
239231
) as g_client:
240232

241233
res = await g_client.client.chat.create_stream_async(messages=[
@@ -260,24 +252,21 @@ asyncio.run(main())
260252

261253
### Per-Client Security Schemes
262254

263-
This SDK supports the following security schemes globally:
255+
This SDK supports the following security scheme globally:
264256

265-
| Name | Type | Scheme | Environment Variable |
266-
| ------------- | ------ | ----------- | -------------------- |
267-
| `api_token` | http | HTTP Bearer | `GLEAN_API_TOKEN` |
268-
| `cookie_auth` | apiKey | API key | `GLEAN_COOKIE_AUTH` |
257+
| Name | Type | Scheme | Environment Variable |
258+
| ----------- | ---- | ----------- | -------------------- |
259+
| `api_token` | http | HTTP Bearer | `GLEAN_API_TOKEN` |
269260

270-
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
261+
To authenticate with the API the `api_token` parameter must be set when initializing the SDK client instance. For example:
271262
```python
272263
from glean import Glean, models
273264
from glean.utils import parse_datetime
274265
import os
275266

276267

277268
with Glean(
278-
security=models.Security(
279-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
280-
),
269+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
281270
) as g_client:
282271

283272
g_client.client.activity.report(events=[
@@ -561,9 +550,7 @@ import os
561550

562551

563552
with Glean(
564-
security=models.Security(
565-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
566-
),
553+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
567554
) as g_client:
568555

569556
g_client.client.activity.report(events=[
@@ -605,9 +592,7 @@ import os
605592

606593
with Glean(
607594
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
608-
security=models.Security(
609-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
610-
),
595+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
611596
) as g_client:
612597

613598
g_client.client.activity.report(events=[
@@ -745,9 +730,7 @@ import os
745730

746731
with Glean(
747732
instance="<value>"
748-
security=models.Security(
749-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
750-
),
733+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
751734
) as g_client:
752735

753736
g_client.client.activity.report(events=[
@@ -790,9 +773,7 @@ import os
790773

791774
with Glean(
792775
server_url="https://instance-name-be.glean.com",
793-
security=models.Security(
794-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
795-
),
776+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
796777
) as g_client:
797778

798779
g_client.client.activity.report(events=[
@@ -914,14 +895,12 @@ The `Glean` class implements the context manager protocol and registers a finali
914895
[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
915896

916897
```python
917-
from glean import Glean, models
898+
from glean import Glean
918899
import os
919900
def main():
920901

921902
with Glean(
922-
security=models.Security(
923-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
924-
),
903+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
925904
) as g_client:
926905
# Rest of application here...
927906

@@ -930,9 +909,7 @@ def main():
930909
async def amain():
931910

932911
async with Glean(
933-
security=models.Security(
934-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
935-
),
912+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
936913
) as g_client:
937914
# Rest of application here...
938915
```

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,14 @@ Based on:
5858
### Generated
5959
- [python v0.4.1] .
6060
### Releases
61-
- [PyPI v0.4.1] https://pypi.org/project/glean/0.4.1 - .
61+
- [PyPI v0.4.1] https://pypi.org/project/glean/0.4.1 - .
62+
63+
## 2025-05-17 23:38:28
64+
### Changes
65+
Based on:
66+
- OpenAPI Doc
67+
- Speakeasy CLI 1.546.2 (2.604.4) https://github.com/speakeasy-api/speakeasy
68+
### Generated
69+
- [python v0.4.2] .
70+
### Releases
71+
- [PyPI v0.4.2] https://pypi.org/project/glean/0.4.2 - .

USAGE.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import os
66

77

88
with Glean(
9-
security=models.Security(
10-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
11-
),
9+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
1210
) as g_client:
1311

1412
res = g_client.client.chat.create(messages=[
@@ -37,9 +35,7 @@ import os
3735
async def main():
3836

3937
async with Glean(
40-
security=models.Security(
41-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
42-
),
38+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
4339
) as g_client:
4440

4541
res = await g_client.client.chat.create_async(messages=[
@@ -65,9 +61,7 @@ import os
6561

6662

6763
with Glean(
68-
security=models.Security(
69-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
70-
),
64+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
7165
) as g_client:
7266

7367
res = g_client.client.chat.create_stream(messages=[
@@ -96,9 +90,7 @@ import os
9690
async def main():
9791

9892
async with Glean(
99-
security=models.Security(
100-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
101-
),
93+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
10294
) as g_client:
10395

10496
res = await g_client.client.chat.create_stream_async(messages=[

docs/models/security.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55

66
| Field | Type | Required | Description |
77
| ------------------ | ------------------ | ------------------ | ------------------ |
8-
| `api_token` | *Optional[str]* | :heavy_minus_sign: | N/A |
9-
| `cookie_auth` | *Optional[str]* | :heavy_minus_sign: | N/A |
8+
| `api_token` | *Optional[str]* | :heavy_minus_sign: | N/A |

docs/sdks/agents/README.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ Get an agent by ID. This endpoint implements the LangChain Agent Protocol, speci
1818
### Example Usage
1919

2020
```python
21-
from glean import Glean, models
21+
from glean import Glean
2222
import os
2323

2424

2525
with Glean(
26-
security=models.Security(
27-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
28-
),
26+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
2927
) as g_client:
3028

3129
res = g_client.client.agents.retrieve(agent_id="<id>")
@@ -60,14 +58,12 @@ Get an agent's schemas by ID. This endpoint implements the LangChain Agent Proto
6058
### Example Usage
6159

6260
```python
63-
from glean import Glean, models
61+
from glean import Glean
6462
import os
6563

6664

6765
with Glean(
68-
security=models.Security(
69-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
70-
),
66+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
7167
) as g_client:
7268

7369
res = g_client.client.agents.retrieve_schemas(agent_id="<id>")
@@ -102,14 +98,12 @@ List Agents available in this service. This endpoint implements the LangChain Ag
10298
### Example Usage
10399

104100
```python
105-
from glean import Glean, models
101+
from glean import Glean
106102
import os
107103

108104

109105
with Glean(
110-
security=models.Security(
111-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
112-
),
106+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
113107
) as g_client:
114108

115109
res = g_client.client.agents.list()
@@ -143,14 +137,12 @@ Creates and triggers a run of an agent. Streams the output in SSE format. This e
143137
### Example Usage
144138

145139
```python
146-
from glean import Glean, models
140+
from glean import Glean
147141
import os
148142

149143

150144
with Glean(
151-
security=models.Security(
152-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
153-
),
145+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
154146
) as g_client:
155147

156148
res = g_client.client.agents.run_stream()
@@ -184,14 +176,12 @@ Creates and triggers a run of an agent. Waits for final output and then returns
184176
### Example Usage
185177

186178
```python
187-
from glean import Glean, models
179+
from glean import Glean
188180
import os
189181

190182

191183
with Glean(
192-
security=models.Security(
193-
api_token=os.getenv("GLEAN_API_TOKEN", ""),
194-
),
184+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
195185
) as g_client:
196186

197187
res = g_client.client.agents.run()

0 commit comments

Comments
 (0)