Skip to content

Commit 34e94e3

Browse files
committed
## Python SDK Changes:
* `ragie.entities.update_instruction()`: * `request` **Changed** (Breaking ⚠️) * `response.context_template` **Added** * `ragie.entities.create_instruction()`: * `request.context_template` **Added** * `response.context_template` **Added** * `ragie.entities.list_by_instruction()`: `response.entities[]` **Changed** * `ragie.elements.get()`: **Added** * `ragie.entities.delete()`: **Removed** (Breaking ⚠️) * `ragie.documents.create()`: * `request.workflow` **Added** * `ragie.documents.create_raw()`: * `request.workflow` **Added** * `ragie.documents.create_document_from_url()`: `request` **Changed** * `ragie.documents.update_document_from_url()`: * `request.update_document_from_url_params.mode` **Changed** * `ragie.entities.list_instructions()`: `response.[].context_template` **Added** * `ragie.entities.delete_instruction()`: **Added** * `ragie.elements.list()`: **Added** * `ragie.entities.list_by_document()`: `response.entities[]` **Changed** * `ragie.entities.list_extraction_logs()`: **Added** * `ragie.connections.create_connection()`: `request` **Changed** * `ragie.connections.create_o_auth_redirect_url()`: `request` **Changed** * `ragie.connections.update()`: * `request.connection_base.partition_strategy` **Changed** * `ragie.webhook_endpoints.list()`: `response.webhook_endpoints[].secret` **Added** * `ragie.webhook_endpoints.create()`: `response.secret` **Added** * `ragie.webhook_endpoints.get()`: `response.secret` **Added** * `ragie.webhook_endpoints.update()`: `response.secret` **Added** * `ragie.authenticators.create_authenticator_connection()`: `request.create_authenticator_connection` **Changed**
1 parent 37eaf2c commit 34e94e3

339 files changed

Lines changed: 11327 additions & 2864 deletions

File tree

Some content is hidden

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

.speakeasy/gen.lock

Lines changed: 1031 additions & 428 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,23 @@ generation:
1616
requestResponseComponentNamesFeb2024: true
1717
securityFeb2025: false
1818
sharedErrorComponentsApr2025: false
19+
sharedNestedComponentsJan2026: false
20+
nameOverrideFeb2026: false
1921
auth:
2022
oAuth2ClientCredentialsEnabled: false
2123
oAuth2PasswordEnabled: false
2224
hoistGlobalSecurity: true
2325
schemas:
2426
allOfMergeStrategy: shallowMerge
2527
requestBodyFieldName: ""
28+
versioningStrategy: automatic
2629
persistentEdits: {}
2730
tests:
2831
generateTests: true
2932
generateNewTests: false
3033
skipResponseBodyAssertions: false
3134
python:
32-
version: 1.15.1
35+
version: 2.0.0
3336
additionalDependencies:
3437
dev: {}
3538
main: {}
@@ -47,10 +50,14 @@ python:
4750
enableCustomCodeRegions: false
4851
enumFormat: enum
4952
fixFlags:
53+
asyncPaginationSep2025: false
54+
conflictResistantModelImportsFeb2026: false
5055
responseRequiredSep2024: false
5156
flattenGlobalSecurity: true
5257
flattenRequests: false
5358
flatteningOrder: parameters-first
59+
forwardCompatibleEnumsByDefault: false
60+
forwardCompatibleUnionsByDefault: "false"
5461
imports:
5562
option: openapi
5663
paths:
@@ -76,3 +83,4 @@ python:
7683
responseFormat: flat
7784
sseFlatResponse: false
7885
templateVersion: v2
86+
useAsyncHooks: false

.speakeasy/workflow.lock

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
speakeasyVersion: 1.682.0
1+
speakeasyVersion: 1.758.0
22
sources:
33
Ragie-OAS:
44
sourceNamespace: ragie-oas
5-
sourceRevisionDigest: sha256:bbff923159484b6f5a7027ee8c16c13a60ce2d9e9f523603fcba9243d1b38da7
6-
sourceBlobDigest: sha256:e781f18c8b4e50249a130e038774b0f9e647fa416eb773f6d638506da7b70f14
5+
sourceRevisionDigest: sha256:b4fa8a2926ef89a1e5d4bfd5ce23080bb68a90ce41ac35e187403ff570e6cb70
6+
sourceBlobDigest: sha256:5eefb8f3cc49bdb8aacee55e3c1e7ee7b379d5d953b2637ab7785194dd974844
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1765152535
109
- 1.0.0
1110
targets:
1211
ragie:
1312
source: Ragie-OAS
1413
sourceNamespace: ragie-oas
15-
sourceRevisionDigest: sha256:bbff923159484b6f5a7027ee8c16c13a60ce2d9e9f523603fcba9243d1b38da7
16-
sourceBlobDigest: sha256:e781f18c8b4e50249a130e038774b0f9e647fa416eb773f6d638506da7b70f14
14+
sourceRevisionDigest: sha256:b4fa8a2926ef89a1e5d4bfd5ce23080bb68a90ce41ac35e187403ff570e6cb70
15+
sourceBlobDigest: sha256:5eefb8f3cc49bdb8aacee55e3c1e7ee7b379d5d953b2637ab7785194dd974844
1716
codeSamplesNamespace: ragie-oas-python-code-samples
18-
codeSamplesRevisionDigest: sha256:cb4c40794dfa72db1e2fca9d89f1a2f529ec8379fd12a0d7525ebabf3bee82f7
17+
codeSamplesRevisionDigest: sha256:bc1ae2a7ecb87d0d74fca268f080f4693d65dc4fa549a5915a17831221bceb53
1918
workflow:
2019
workflowVersion: 1.0.0
2120
speakeasyVersion: latest

README-PYPI.md

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ It's also possible to write a standalone Python script without needing to set up
8484
```python
8585
#!/usr/bin/env -S uv run --script
8686
# /// script
87-
# requires-python = ">=3.9"
87+
# requires-python = ">=3.10"
8888
# dependencies = [
8989
# "ragie",
9090
# ]
@@ -181,7 +181,6 @@ with Ragie(
181181
res = r_client.connections.create_connection(request=ragie.PublicCreateConnection(
182182
partition_strategy=ragie.MediaModeParam(),
183183
page_limit=None,
184-
config=None,
185184
connection=ragie.PublicGCSConnection(
186185
data=ragie.BucketData(
187186
bucket="<value>",
@@ -217,7 +216,6 @@ async def main():
217216
res = await r_client.connections.create_connection_async(request=ragie.PublicCreateConnection(
218217
partition_strategy=ragie.MediaModeParam(),
219218
page_limit=None,
220-
config=None,
221219
connection=ragie.PublicGCSConnection(
222220
data=ragie.BucketData(
223221
bucket="<value>",
@@ -303,7 +301,6 @@ with Ragie(
303301
res = r_client.authenticators.create_authenticator_connection(authenticator_id="84b0792c-1330-4854-b4f2-5d9c7bf9a385", create_authenticator_connection=ragie.CreateAuthenticatorConnection(
304302
partition_strategy=ragie.MediaModeParam(),
305303
page_limit=None,
306-
config=None,
307304
connection=ragie.AuthenticatorDropboxConnection(
308305
data=ragie.FolderData(
309306
folder_id="<id>",
@@ -339,7 +336,6 @@ async def main():
339336
res = await r_client.authenticators.create_authenticator_connection_async(authenticator_id="84b0792c-1330-4854-b4f2-5d9c7bf9a385", create_authenticator_connection=ragie.CreateAuthenticatorConnection(
340337
partition_strategy=ragie.MediaModeParam(),
341338
page_limit=None,
342-
config=None,
343339
connection=ragie.AuthenticatorDropboxConnection(
344340
data=ragie.FolderData(
345341
folder_id="<id>",
@@ -367,8 +363,8 @@ asyncio.run(main())
367363

368364
### [Authenticators](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/authenticators/README.md)
369365

370-
* [create](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/authenticators/README.md#create) - Create Authenticator
371366
* [list](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/authenticators/README.md#list) - List Authenticators
367+
* [create](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/authenticators/README.md#create) - Create Authenticator
372368
* [create_authenticator_connection](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/authenticators/README.md#create_authenticator_connection) - Create Authenticator Connection
373369
* [delete_authenticator_connection](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/authenticators/README.md#delete_authenticator_connection) - Delete Authenticator
374370

@@ -379,17 +375,17 @@ asyncio.run(main())
379375
* [create_o_auth_redirect_url](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#create_o_auth_redirect_url) - Create Oauth Redirect Url
380376
* [list_connection_source_types](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#list_connection_source_types) - List Connection Source Types
381377
* [set_enabled](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#set_enabled) - Set Connection Enabled
382-
* [update](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#update) - Update Connection
383378
* [get](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#get) - Get Connection
379+
* [update](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#update) - Update Connection
384380
* [get_stats](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#get_stats) - Get Connection Stats
385381
* [set_limits](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#set_limits) - Set Connection Limits
386382
* [delete](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#delete) - Delete Connection
387383
* [sync](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#sync) - Sync Connection
388384

389385
### [Documents](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md)
390386

391-
* [create](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#create) - Create Document
392387
* [list](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#list) - List Documents
388+
* [create](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#create) - Create Document
393389
* [create_raw](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#create_raw) - Create Document Raw
394390
* [create_document_from_url](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#create_document_from_url) - Create Document From Url
395391
* [get](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#get) - Get Document
@@ -405,22 +401,28 @@ asyncio.run(main())
405401
* [get_source](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#get_source) - Get Document Source
406402
* [get_summary](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#get_summary) - Get Document Summary
407403

404+
### [Elements](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/elements/README.md)
405+
406+
* [list](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/elements/README.md#list) - List Elements For Document
407+
* [get](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/elements/README.md#get) - Get Element For Document
408+
408409
### [Entities](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md)
409410

410411
* [list_instructions](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#list_instructions) - List Instructions
411412
* [create_instruction](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#create_instruction) - Create Instruction
412-
* [update_instruction](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#update_instruction) - Update Instruction
413-
* [delete](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#delete) - Delete Instruction
413+
* [delete_instruction](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#delete_instruction) - Delete Instruction
414+
* [update_instruction](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#update_instruction) - Patch Instruction
414415
* [list_by_instruction](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#list_by_instruction) - Get Instruction Extracted Entities
416+
* [list_extraction_logs](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#list_extraction_logs) - Get Instruction Entity Extraction Logs
415417
* [list_by_document](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#list_by_document) - Get Document Extracted Entities
416418

417419
### [Partitions](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md)
418420

419421
* [list](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#list) - List Partitions
420422
* [create](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#create) - Create Partition
421423
* [get](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#get) - Get Partition
422-
* [update](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#update) - Update Partition
423424
* [delete](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#delete) - Delete Partition
425+
* [update](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#update) - Update Partition
424426
* [set_limits](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#set_limits) - Set Partition Limits
425427

426428
### [Responses](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/responses/README.md)
@@ -437,8 +439,8 @@ asyncio.run(main())
437439
* [list](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/webhookendpoints/README.md#list) - List Webhook Endpoints
438440
* [create](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/webhookendpoints/README.md#create) - Create Webhook Endpoint
439441
* [get](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/webhookendpoints/README.md#get) - Get Webhook Endpoint
440-
* [update](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/webhookendpoints/README.md#update) - Update Webhook Endpoint
441442
* [delete](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/webhookendpoints/README.md#delete) - Delete Webhook Endpoint
443+
* [update](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/webhookendpoints/README.md#update) - Update Webhook Endpoint
442444

443445
</details>
444446
<!-- End Available Resources and Operations [operations] -->
@@ -518,16 +520,16 @@ with Ragie(
518520
auth="<YOUR_BEARER_TOKEN_HERE>",
519521
) as r_client:
520522

521-
res = r_client.documents.create(request={
522-
"file": {
523-
"file_name": "example.file",
524-
"content": open("example.file", "rb"),
525-
},
523+
res = r_client.documents.list(request={
524+
"filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}",
525+
"partition": "acme_customer_id",
526526
},
527527
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
528528

529-
# Handle response
530-
print(res)
529+
while res is not None:
530+
# Handle items
531+
532+
res = res.next()
531533

532534
```
533535

@@ -542,15 +544,15 @@ with Ragie(
542544
auth="<YOUR_BEARER_TOKEN_HERE>",
543545
) as r_client:
544546

545-
res = r_client.documents.create(request={
546-
"file": {
547-
"file_name": "example.file",
548-
"content": open("example.file", "rb"),
549-
},
547+
res = r_client.documents.list(request={
548+
"filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}",
549+
"partition": "acme_customer_id",
550550
})
551551

552-
# Handle response
553-
print(res)
552+
while res is not None:
553+
# Handle items
554+
555+
res = res.next()
554556

555557
```
556558
<!-- End Retries [retries] -->
@@ -581,15 +583,15 @@ with Ragie(
581583
res = None
582584
try:
583585

584-
res = r_client.documents.create(request={
585-
"file": {
586-
"file_name": "example.file",
587-
"content": open("example.file", "rb"),
588-
},
586+
res = r_client.documents.list(request={
587+
"filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}",
588+
"partition": "acme_customer_id",
589589
})
590590

591-
# Handle response
592-
print(res)
591+
while res is not None:
592+
# Handle items
593+
594+
res = res.next()
593595

594596

595597
except models.RagieError as e:
@@ -644,15 +646,15 @@ with Ragie(
644646
auth="<YOUR_BEARER_TOKEN_HERE>",
645647
) as r_client:
646648

647-
res = r_client.documents.create(request={
648-
"file": {
649-
"file_name": "example.file",
650-
"content": open("example.file", "rb"),
651-
},
649+
res = r_client.documents.list(request={
650+
"filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}",
651+
"partition": "acme_customer_id",
652652
})
653653

654-
# Handle response
655-
print(res)
654+
while res is not None:
655+
# Handle items
656+
657+
res = res.next()
656658

657659
```
658660
<!-- End Server Selection [server] -->
@@ -758,15 +760,15 @@ with Ragie(
758760
auth="<YOUR_BEARER_TOKEN_HERE>",
759761
) as r_client:
760762

761-
res = r_client.documents.create(request={
762-
"file": {
763-
"file_name": "example.file",
764-
"content": open("example.file", "rb"),
765-
},
763+
res = r_client.documents.list(request={
764+
"filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}",
765+
"partition": "acme_customer_id",
766766
})
767767

768-
# Handle response
769-
print(res)
768+
while res is not None:
769+
# Handle items
770+
771+
res = res.next()
770772

771773
```
772774
<!-- End Authentication [security] -->

0 commit comments

Comments
 (0)