Skip to content

Commit 6e1f46f

Browse files
ci: restructure glean package to namespace structure
1 parent 666c18d commit 6e1f46f

File tree

555 files changed

+179
-49586
lines changed

Some content is hidden

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

555 files changed

+179
-49586
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
135135

136136
```python
137137
# Synchronous Example
138-
from glean import Glean, models
138+
from glean.api_client import Glean, models
139139
import os
140140

141141

@@ -163,7 +163,7 @@ The same SDK client can also be used to make asychronous requests by importing a
163163
```python
164164
# Asynchronous Example
165165
import asyncio
166-
from glean import Glean, models
166+
from glean.api_client import Glean, models
167167
import os
168168

169169
async def main():
@@ -192,7 +192,7 @@ asyncio.run(main())
192192

193193
```python
194194
# Synchronous Example
195-
from glean import Glean, models
195+
from glean.api_client import Glean, models
196196
import os
197197

198198

@@ -220,7 +220,7 @@ The same SDK client can also be used to make asychronous requests by importing a
220220
```python
221221
# Asynchronous Example
222222
import asyncio
223-
from glean import Glean, models
223+
from glean.api_client import Glean, models
224224
import os
225225

226226
async def main():
@@ -259,8 +259,8 @@ This SDK supports the following security scheme globally:
259259

260260
To authenticate with the API the `api_token` parameter must be set when initializing the SDK client instance. For example:
261261
```python
262-
from glean import Glean, models
263-
from glean.utils import parse_datetime
262+
from glean.api_client import Glean, models
263+
from glean.api_client.utils import parse_datetime
264264
import os
265265

266266

@@ -541,8 +541,8 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an
541541

542542
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
543543
```python
544-
from glean import Glean, models
545-
from glean.utils import BackoffStrategy, RetryConfig, parse_datetime
544+
from glean.api_client import Glean, models
545+
from glean.api_client.utils import BackoffStrategy, RetryConfig, parse_datetime
546546
import os
547547

548548

@@ -582,8 +582,8 @@ with Glean(
582582

583583
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:
584584
```python
585-
from glean import Glean, models
586-
from glean.utils import BackoffStrategy, RetryConfig, parse_datetime
585+
from glean.api_client import Glean, models
586+
from glean.api_client.utils import BackoffStrategy, RetryConfig, parse_datetime
587587
import os
588588

589589

@@ -720,8 +720,8 @@ The default server `https://{instance}-be.glean.com` contains variables and is s
720720
#### Example
721721

722722
```python
723-
from glean import Glean, models
724-
from glean.utils import parse_datetime
723+
from glean.api_client import Glean, models
724+
from glean.api_client.utils import parse_datetime
725725
import os
726726

727727

@@ -763,8 +763,8 @@ with Glean(
763763

764764
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:
765765
```python
766-
from glean import Glean, models
767-
from glean.utils import parse_datetime
766+
from glean.api_client import Glean, models
767+
from glean.api_client.utils import parse_datetime
768768
import os
769769

770770

@@ -812,7 +812,7 @@ This allows you to wrap the client with your own custom logic, such as adding cu
812812

813813
For example, you could specify a header for every request that this sdk makes as follows:
814814
```python
815-
from glean import Glean
815+
from glean.api_client import Glean
816816
import httpx
817817

818818
http_client = httpx.Client(headers={"x-custom-header": "someValue"})
@@ -821,8 +821,8 @@ s = Glean(client=http_client)
821821

822822
or you could wrap the client with your own custom logic:
823823
```python
824-
from glean import Glean
825-
from glean.httpclient import AsyncHttpClient
824+
from glean.api_client import Glean
825+
from glean.api_client.httpclient import AsyncHttpClient
826826
import httpx
827827

828828
class CustomClient(AsyncHttpClient):
@@ -892,7 +892,7 @@ The `Glean` class implements the context manager protocol and registers a finali
892892
[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
893893

894894
```python
895-
from glean import Glean
895+
from glean.api_client import Glean
896896
import os
897897
def main():
898898

@@ -919,7 +919,7 @@ You can setup your SDK to emit debug logs for SDK requests and responses.
919919

920920
You can pass your own logger class directly into your SDK.
921921
```python
922-
from glean import Glean
922+
from glean.api_client import Glean
923923
import logging
924924

925925
logging.basicConfig(level=logging.DEBUG)

USAGE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- Start SDK Example Usage [usage] -->
22
```python
33
# Synchronous Example
4-
from glean import Glean, models
4+
from glean.api_client import Glean, models
55
import os
66

77

@@ -29,7 +29,7 @@ The same SDK client can also be used to make asychronous requests by importing a
2929
```python
3030
# Asynchronous Example
3131
import asyncio
32-
from glean import Glean, models
32+
from glean.api_client import Glean, models
3333
import os
3434

3535
async def main():
@@ -56,7 +56,7 @@ asyncio.run(main())
5656

5757
```python
5858
# Synchronous Example
59-
from glean import Glean, models
59+
from glean.api_client import Glean, models
6060
import os
6161

6262

@@ -84,7 +84,7 @@ The same SDK client can also be used to make asychronous requests by importing a
8484
```python
8585
# Asynchronous Example
8686
import asyncio
87-
from glean import Glean, models
87+
from glean.api_client import Glean, models
8888
import os
8989

9090
async def main():

docs/sdks/agents/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Returns details of an [agent](https://developers.glean.com/agents/agents-api) cr
1818
### Example Usage
1919

2020
```python
21-
from glean import Glean
21+
from glean.api_client import Glean
2222
import os
2323

2424

@@ -58,7 +58,7 @@ Return [agent](https://developers.glean.com/agents/agents-api)'s input and outpu
5858
### Example Usage
5959

6060
```python
61-
from glean import Glean
61+
from glean.api_client import Glean
6262
import os
6363

6464

@@ -98,7 +98,7 @@ Search for [agents](https://developers.glean.com/agents/agents-api) by agent nam
9898
### Example Usage
9999

100100
```python
101-
from glean import Glean
101+
from glean.api_client import Glean
102102
import os
103103

104104

@@ -137,7 +137,7 @@ Executes an [agent](https://developers.glean.com/agents/agents-api) run and retu
137137
### Example Usage
138138

139139
```python
140-
from glean import Glean
140+
from glean.api_client import Glean
141141
import os
142142

143143

@@ -178,7 +178,7 @@ Executes an [agent](https://developers.glean.com/agents/agents-api) run and retu
178178
### Example Usage
179179

180180
```python
181-
from glean import Glean
181+
from glean.api_client import Glean
182182
import os
183183

184184

docs/sdks/announcements/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Create a textual announcement visible to some set of users based on department a
1717

1818
```python
1919
from datetime import date
20-
from glean import Glean, models
21-
from glean.utils import parse_datetime
20+
from glean.api_client import Glean, models
21+
from glean.api_client.utils import parse_datetime
2222
import os
2323

2424

@@ -22092,7 +22092,7 @@ Delete an existing user-generated announcement.
2209222092
### Example Usage
2209322093

2209422094
```python
22095-
from glean import Glean
22095+
from glean.api_client import Glean
2209622096
import os
2209722097

2209822098

@@ -22127,8 +22127,8 @@ Update a textual announcement visible to some set of users based on department a
2212722127

2212822128
```python
2212922129
from datetime import date
22130-
from glean import Glean, models
22131-
from glean.utils import parse_datetime
22130+
from glean.api_client import Glean, models
22131+
from glean.api_client.utils import parse_datetime
2213222132
import os
2213322133

2213422134

docs/sdks/answers/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Create a user-generated Answer that contains a question and answer.
1919

2020
```python
2121
from datetime import date
22-
from glean import Glean, models
23-
from glean.utils import parse_datetime
22+
from glean.api_client import Glean, models
23+
from glean.api_client.utils import parse_datetime
2424
import os
2525

2626

@@ -1390,7 +1390,7 @@ Delete an existing user-generated Answer.
13901390
### Example Usage
13911391

13921392
```python
1393-
from glean import Glean
1393+
from glean.api_client import Glean
13941394
import os
13951395

13961396

@@ -1426,8 +1426,8 @@ Update an existing user-generated Answer.
14261426

14271427
```python
14281428
from datetime import date
1429-
from glean import Glean, models
1430-
from glean.utils import parse_datetime
1429+
from glean.api_client import Glean, models
1430+
from glean.api_client.utils import parse_datetime
14311431
import os
14321432

14331433

@@ -2391,7 +2391,7 @@ Read the details of a particular Answer given its ID.
23912391
### Example Usage
23922392

23932393
```python
2394-
from glean import Glean
2394+
from glean.api_client import Glean
23952395
import os
23962396

23972397

@@ -2431,7 +2431,7 @@ List Answers created by the current user.
24312431
### Example Usage
24322432

24332433
```python
2434-
from glean import Glean
2434+
from glean.api_client import Glean
24352435
import os
24362436

24372437

docs/sdks/clientactivity/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Report user activity that occurs on indexed documents such as viewing or editing
1515
### Example Usage
1616

1717
```python
18-
from glean import Glean, models
19-
from glean.utils import parse_datetime
18+
from glean.api_client import Glean, models
19+
from glean.api_client.utils import parse_datetime
2020
import os
2121

2222

@@ -73,7 +73,7 @@ Report events that happen to results within a Glean client UI, such as search re
7373
### Example Usage
7474

7575
```python
76-
from glean import Glean, models
76+
from glean.api_client import Glean, models
7777
import os
7878

7979

docs/sdks/clientauthentication/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Creates an authentication token for the authenticated user.
1414
### Example Usage
1515

1616
```python
17-
from glean import Glean
17+
from glean.api_client import Glean
1818
import os
1919

2020

0 commit comments

Comments
 (0)