Skip to content

Commit 0f61907

Browse files
authored
chore/enable publishing for python client 🎉 (#102)
Changes: * Bring the publish step back to the speakeasy workflow, regenerate the github action with `speakeasy configure publishing` * Remove incorrect readme note about parent_id being disabled * Knock the package version back down to 0.23.0 for continuity with PyPI versions
1 parent 224f9ad commit 0f61907

File tree

5 files changed

+29
-118
lines changed

5 files changed

+29
-118
lines changed

Diff for: ‎.github/workflows/speakeasy_sdk_publish.yaml

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
name: Publish
2+
permissions:
3+
checks: write
4+
contents: write
5+
pull-requests: write
6+
statuses: write
27
"on":
3-
push:
4-
branches:
5-
- main
6-
paths:
7-
- RELEASES.md
8+
push:
9+
branches:
10+
- main
11+
paths:
12+
- RELEASES.md
13+
- '*/RELEASES.md'
814
jobs:
9-
publish:
10-
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
11-
secrets:
12-
github_access_token: ${{ secrets.GITHUB_TOKEN }}
13-
pypi_token: ${{ secrets.PYPI_TOKEN }}
14-
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
15+
publish:
16+
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
17+
secrets:
18+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
19+
pypi_token: ${{ secrets.PYPI_TOKEN }}
20+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

Diff for: ‎.speakeasy/workflow.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ targets:
1212
unstructured-python:
1313
target: python
1414
source: my-source
15+
publish:
16+
pypi:
17+
token: $PYPI_TOKEN
1518
codeSamples:
1619
output: codeSamples.yaml

Diff for: ‎README.md

+7-9
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@
99
<a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
1010
</div>
1111

12-
<h2 align="center">
13-
<p>Python SDK for the Unstructured API</p>
14-
</h2>
15-
16-
This is a Python client for the [Unstructured API](https://unstructured-io.github.io/unstructured/api.html).
17-
1812
<div align="center">
1913

2014
<a
@@ -24,6 +18,13 @@ This is a Python client for the [Unstructured API](https://unstructured-io.githu
2418

2519
</div>
2620

21+
22+
<h2 align="center">
23+
<p>Python SDK for the Unstructured API</p>
24+
</h2>
25+
26+
This is a Python client for the [Unstructured API](https://unstructured-io.github.io/unstructured/api.html).
27+
2728
<!-- Start SDK Installation [installation] -->
2829
## SDK Installation
2930

@@ -108,9 +109,6 @@ See the [general partition](/docs/models/shared/partitionparameters.md) page for
108109

109110
In order to speed up processing of long PDF files, `split_pdf_page` can be set to `True` (defaults to `False`). It will cause the PDF to be split at client side, before sending to API, and combining individual responses as single result. This parameter will affect only PDF files, no need to disable it for other filetypes.
110111

111-
Warning: this feature causes the `parent_id` metadata generation in elements to be disabled, as that
112-
requires having context of multiple pages.
113-
114112
The amount of workers utilized for splitting PDFs is dictated by the `split_pdf_concurrency_level` parameter, with a default of 5 and a maximum of 15 to keep resource usage and costs in check. The splitting process leverages `asyncio` to manage concurrency effectively.
115113
The size of each batch of pages (ranging from 2 to 20) is internally determined based on the concurrency level and the total number of pages in the document. Because the splitting process uses `asyncio` the client can encouter event loop issues if it is nested in another async runner, like running in a `gevent` spawned task. Instead, this is safe to run in multiprocessing workers (e.g., using `multiprocessing.Pool` with `fork` context).
116114

Diff for: ‎RELEASES.md

+1-97
Original file line numberDiff line numberDiff line change
@@ -474,100 +474,4 @@ Based on:
474474
### Generated
475475
- [python v0.22.0] .
476476
### Releases
477-
- [PyPI v0.22.0] https://pypi.org/project/unstructured-client/0.22.0 - .
478-
479-
## 2024-04-04 00:19:30
480-
### Changes
481-
Based on:
482-
- OpenAPI Doc
483-
- Speakeasy CLI 1.235.2 (2.298.2) https://github.com/speakeasy-api/speakeasy
484-
### Generated
485-
- [python v0.23.0] .
486-
487-
## 2024-04-06 00:18:10
488-
### Changes
489-
Based on:
490-
- OpenAPI Doc
491-
- Speakeasy CLI 1.241.0 (2.300.0) https://github.com/speakeasy-api/speakeasy
492-
### Generated
493-
- [python v0.23.1] .
494-
495-
## 2024-05-02 00:19:08
496-
### Changes
497-
Based on:
498-
- OpenAPI Doc
499-
- Speakeasy CLI 1.277.4 (2.318.3) https://github.com/speakeasy-api/speakeasy
500-
### Generated
501-
- [python v0.24.0] .
502-
503-
## 2024-05-03 00:19:27
504-
### Changes
505-
Based on:
506-
- OpenAPI Doc
507-
- Speakeasy CLI 1.277.8 (2.319.10) https://github.com/speakeasy-api/speakeasy
508-
### Generated
509-
- [python v0.24.1] .
510-
511-
## 2024-05-07 00:19:38
512-
### Changes
513-
Based on:
514-
- OpenAPI Doc
515-
- Speakeasy CLI 1.280.1 (2.322.5) https://github.com/speakeasy-api/speakeasy
516-
### Generated
517-
- [python v0.24.2] .
518-
519-
## 2024-05-09 00:19:17
520-
### Changes
521-
Based on:
522-
- OpenAPI Doc
523-
- Speakeasy CLI 1.285.1 (2.326.3) https://github.com/speakeasy-api/speakeasy
524-
### Generated
525-
- [python v0.25.0] .
526-
527-
## 2024-05-10 00:19:28
528-
### Changes
529-
Based on:
530-
- OpenAPI Doc
531-
- Speakeasy CLI 1.285.3 (2.326.3) https://github.com/speakeasy-api/speakeasy
532-
### Generated
533-
- [python v0.25.1] .
534-
535-
## 2024-05-10 14:48:16
536-
### Changes
537-
Based on:
538-
- OpenAPI Doc
539-
- Speakeasy CLI 1.285.4 (2.326.3) https://github.com/speakeasy-api/speakeasy
540-
### Generated
541-
- [python v0.25.2] .
542-
543-
## 2024-05-18 00:19:44
544-
### Changes
545-
Based on:
546-
- OpenAPI Doc
547-
- Speakeasy CLI 1.293.1 (2.333.3) https://github.com/speakeasy-api/speakeasy
548-
### Generated
549-
- [python v0.25.3] .
550-
551-
## 2024-05-23 00:19:36
552-
### Changes
553-
Based on:
554-
- OpenAPI Doc
555-
- Speakeasy CLI 1.295.1 (2.335.5) https://github.com/speakeasy-api/speakeasy
556-
### Generated
557-
- [python v0.26.5] .
558-
559-
## 2024-06-03 00:52:27
560-
### Changes
561-
Based on:
562-
- OpenAPI Doc
563-
- Speakeasy CLI 1.299.4 (2.338.7) https://github.com/speakeasy-api/speakeasy
564-
### Generated
565-
- [python v0.27.0] .
566-
567-
## 2024-06-04 02:44:17
568-
### Changes
569-
Based on:
570-
- OpenAPI Doc
571-
- Speakeasy CLI 1.299.6 (2.338.12) https://github.com/speakeasy-api/speakeasy
572-
### Generated
573-
- [python v0.27.1] .
477+
- [PyPI v0.22.0] https://pypi.org/project/unstructured-client/0.22.0 - .

Diff for: ‎gen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ generation:
1010
auth:
1111
oAuth2ClientCredentialsEnabled: false
1212
python:
13-
version: 0.27.1
13+
version: 0.23.0
1414
additionalDependencies:
1515
dependencies:
1616
deepdiff: '>=6.0'

0 commit comments

Comments
 (0)