Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ generation:
generateNewTests: true
skipResponseBodyAssertions: true
python:
version: 0.4.0
version: 0.4.1
additionalDependencies:
dev: {}
main: {}
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/glean-merged-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ servers:
default: instance-name
description: The instance name (typically the email domain without the TLD) that determines the deployment backend.
security:
- actAsBearerToken: []
- APIToken: []
- cookieAuth: []
paths:
/rest/api/v1/activity:
Expand Down
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ speakeasyVersion: 1.546.1
sources:
Glean API:
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:12025ddda6d78666c39b69cec5ea04504ae09fc142cbdb3c33b0c4018d9e7493
sourceBlobDigest: sha256:2ad51e5bc2b18513ffbe1cce35e497bba4fc3a86bdf55f9ffe2463b8f7e154ee
sourceRevisionDigest: sha256:81bbab1ab458be7ad4d3b4e052629504f2dc32e0554426fc4bac347061fad35c
sourceBlobDigest: sha256:f2a2721aa0c1960218fc0a261ef3f689e2e78c399b36b7e6602e6ad8650206ac
tags:
- latest
- speakeasy-sdk-regen-1747100451
- speakeasy-sdk-regen-1747427742
Glean Client API:
sourceNamespace: glean-client-api
sourceRevisionDigest: sha256:4edc63ad559e4f2c9fb9ebf5edaaaaa9269f1874d271cfd84b441d6dacac43d2
Expand All @@ -17,10 +17,10 @@ targets:
glean:
source: Glean API
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:12025ddda6d78666c39b69cec5ea04504ae09fc142cbdb3c33b0c4018d9e7493
sourceBlobDigest: sha256:2ad51e5bc2b18513ffbe1cce35e497bba4fc3a86bdf55f9ffe2463b8f7e154ee
sourceRevisionDigest: sha256:81bbab1ab458be7ad4d3b4e052629504f2dc32e0554426fc4bac347061fad35c
sourceBlobDigest: sha256:f2a2721aa0c1960218fc0a261ef3f689e2e78c399b36b7e6602e6ad8650206ac
codeSamplesNamespace: glean-api-specs-python-code-samples
codeSamplesRevisionDigest: sha256:8e5b4274391e4d233c3f3763a738f01d9b2e9a7e89b411ebeabce138609d2a53
codeSamplesRevisionDigest: sha256:77c663e0da7182a41d5bfbf2d40c5c3c5510eaade3541631d7ecacbbb2ec31bd
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ import os

with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -173,7 +173,7 @@ async def main():

async with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -203,7 +203,7 @@ import os

with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -234,7 +234,7 @@ async def main():

async with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -262,10 +262,10 @@ asyncio.run(main())

This SDK supports the following security schemes globally:

| Name | Type | Scheme | Environment Variable |
| --------------------- | ------ | ------- | --------------------------- |
| `act_as_bearer_token` | apiKey | API key | `GLEAN_ACT_AS_BEARER_TOKEN` |
| `cookie_auth` | apiKey | API key | `GLEAN_COOKIE_AUTH` |
| Name | Type | Scheme | Environment Variable |
| ------------- | ------ | ----------- | -------------------- |
| `api_token` | http | HTTP Bearer | `GLEAN_API_TOKEN` |
| `cookie_auth` | apiKey | API key | `GLEAN_COOKIE_AUTH` |

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:
```python
Expand All @@ -276,7 +276,7 @@ import os

with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -562,7 +562,7 @@ import os

with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -606,7 +606,7 @@ import os
with Glean(
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -746,7 +746,7 @@ import os
with Glean(
instance="<value>"
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -791,7 +791,7 @@ import os
with Glean(
server_url="https://instance-name-be.glean.com",
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -920,7 +920,7 @@ def main():

with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:
# Rest of application here...
Expand All @@ -931,7 +931,7 @@ async def amain():

async with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:
# Rest of application here...
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,14 @@ Based on:
### Generated
- [python v0.4.0] .
### Releases
- [PyPI v0.4.0] https://pypi.org/project/glean/0.4.0 - .
- [PyPI v0.4.0] https://pypi.org/project/glean/0.4.0 - .

## 2025-05-16 20:35:24
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.546.1 (2.604.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.4.1] .
### Releases
- [PyPI v0.4.1] https://pypi.org/project/glean/0.4.1 - .
8 changes: 4 additions & 4 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import os

with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -38,7 +38,7 @@ async def main():

async with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -66,7 +66,7 @@ import os

with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -97,7 +97,7 @@ async def main():

async with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down
8 changes: 4 additions & 4 deletions docs/models/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Fields

| Field | Type | Required | Description |
| --------------------- | --------------------- | --------------------- | --------------------- |
| `act_as_bearer_token` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `cookie_auth` | *Optional[str]* | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `api_token` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `cookie_auth` | *Optional[str]* | :heavy_minus_sign: | N/A |
10 changes: 5 additions & 5 deletions docs/sdks/agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import os

with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -66,7 +66,7 @@ import os

with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -108,7 +108,7 @@ import os

with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -149,7 +149,7 @@ import os

with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down Expand Up @@ -190,7 +190,7 @@ import os

with Glean(
security=models.Security(
act_as_bearer_token=os.getenv("GLEAN_ACT_AS_BEARER_TOKEN", ""),
api_token=os.getenv("GLEAN_API_TOKEN", ""),
),
) as g_client:

Expand Down
Loading