Skip to content

Commit 8b180a9

Browse files
committed
chore: bump version
1 parent d9facb7 commit 8b180a9

File tree

7 files changed

+129
-40
lines changed

7 files changed

+129
-40
lines changed

.github/workflows/sdk_publish.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ permissions:
66
statuses: write
77
id-token: write
88
"on":
9-
push:
10-
branches:
11-
- main
12-
paths:
13-
- .speakeasy/gen.lock
9+
# push:
10+
# branches:
11+
# - main
12+
# paths:
13+
# - .speakeasy/gen.lock
1414
workflow_dispatch: {}
1515
jobs:
1616
publish:

.speakeasy/gen.lock

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ management:
55
docVersion: 0.0.0
66
speakeasyVersion: 1.481.1
77
generationVersion: 2.500.5
8-
releaseVersion: 0.0.2
9-
configChecksum: 0d454ea52b6c9682854374830aa48bb8
8+
releaseVersion: 0.0.3
9+
configChecksum: b3a1dd1e168b3d503d7ac5f3ce87b887
1010
repoURL: https://github.com/documenso/sdk-python.git
1111
installationURL: https://github.com/documenso/sdk-python.git
12+
published: true
1213
features:
1314
python:
1415
additionalDependencies: 1.0.0
@@ -1660,7 +1661,7 @@ examples:
16601661
application/json: {"documentId": 8574.78}
16611662
responses:
16621663
"200":
1663-
application/json: {"visibility": "MANAGER_AND_ABOVE", "status": "PENDING", "source": "TEMPLATE_DIRECT_LINK", "id": 627690, "externalId": "<id>", "userId": 4888.52, "authOptions": {"globalAccessAuth": "ACCOUNT", "globalActionAuth": "TWO_FACTOR_AUTH"}, "formValues": {"key": true, "key1": 6276.9, "key2": false}, "title": "<value>", "documentDataId": "<id>", "createdAt": "1734110098143", "updatedAt": "1737326276875", "completedAt": "<value>", "deletedAt": "<value>", "teamId": 311507, "templateId": 249440}
1664+
application/json: {"visibility": "MANAGER_AND_ABOVE", "status": "PENDING", "source": "TEMPLATE_DIRECT_LINK", "id": 627690, "externalId": "<id>", "userId": 4888.52, "authOptions": {"globalAccessAuth": "ACCOUNT", "globalActionAuth": "TWO_FACTOR_AUTH"}, "formValues": {"key": true, "key1": 6276.9, "key2": 5971.29}, "title": "<value>", "documentDataId": "<id>", "createdAt": "1734110098143", "updatedAt": "1737326276875", "completedAt": "<value>", "deletedAt": "<value>", "teamId": 311507, "templateId": 249440}
16641665
"400":
16651666
application/json: {"message": "Invalid input data", "code": "BAD_REQUEST", "issues": []}
16661667
"500":

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ generation:
1616
oAuth2ClientCredentialsEnabled: false
1717
oAuth2PasswordEnabled: false
1818
python:
19-
version: 0.0.2
19+
version: 0.0.3
2020
additionalDependencies:
2121
dev: {}
2222
main: {}

.speakeasy/workflow.lock

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ sources:
66
sourceBlobDigest: sha256:1660a3a61f026b73adb9b2fdddc49fcbf66b8534c3394b38a434cf857333a785
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1738368732
109
targets:
1110
documenso:
1211
source: documenso-OAS
1312
sourceNamespace: documenso-v-2-beta-api
1413
sourceRevisionDigest: sha256:167083b8ead58f1af1e1e4d0ac8e36779a26c8d14d03982a3379af79c7a1910b
1514
sourceBlobDigest: sha256:1660a3a61f026b73adb9b2fdddc49fcbf66b8534c3394b38a434cf857333a785
1615
codeSamplesNamespace: documenso-oas-python-code-samples
17-
codeSamplesRevisionDigest: sha256:ded89ad8f552a5e7308c646fb076b023dfa0dcd929dedcf9a6a9f1cb711a8cea
16+
codeSamplesRevisionDigest: sha256:10641132a0afadd696699f72701a0b6ce2c0e656d8926bad9a6021043fda5e04
1817
workflow:
1918
workflowVersion: 1.0.0
2019
speakeasyVersion: latest
@@ -28,6 +27,9 @@ workflow:
2827
documenso:
2928
target: python
3029
source: documenso-OAS
30+
publish:
31+
pypi:
32+
token: $pypi_token
3133
codeSamples:
3234
registry:
3335
location: registry.speakeasyapi.dev/documenso-inc/api/documenso-oas-python-code-samples

README.md

Lines changed: 112 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,40 @@
1313

1414
A SDK for seamless integration with Documenso v2 API.
1515

16-
The full Documenso API can be viewed here (**todo**), which includes examples.
16+
The full Documenso API can be viewed [here](https://openapi.documenso.com/), which includes examples.
1717

1818
## ⚠️ Warning
1919

2020
Documenso v2 API and SDKs are currently in beta. There may be to breaking changes.
2121

2222
To keep updated, please follow the discussions here:
23+
2324
- [Feedback](https://github.com/documenso/documenso/discussions/1611)
2425
- [Breaking change alerts](https://github.com/documenso/documenso/discussions/1612)
2526
<!-- No Summary [summary] -->
2627

2728
## Table of Contents
29+
2830
<!-- $toc-max-depth=2 -->
29-
* [Overview](#documenso-python-sdk)
30-
* [SDK Installation](#sdk-installation)
31-
* [IDE Support](#ide-support)
32-
* [Authentication](#authentication)
33-
* [Document creation example](#document-creation-example)
34-
* [Available Resources and Operations](#available-resources-and-operations)
35-
* [Retries](#retries)
36-
* [Error Handling](#error-handling)
37-
* [Debugging](#debugging)
38-
* [Development](#development)
39-
* [Maturity](#maturity)
40-
* [Contributions](#contributions)
31+
32+
- [Overview](#documenso-python-sdk)
33+
- [SDK Installation](#sdk-installation)
34+
- [IDE Support](#ide-support)
35+
- [Authentication](#authentication)
36+
- [Document creation example](#document-creation-example)
37+
- [Available Resources and Operations](#available-resources-and-operations)
38+
- [Retries](#retries)
39+
- [Error Handling](#error-handling)
40+
- [Debugging](#debugging)
41+
- [Development](#development)
42+
- [Maturity](#maturity)
43+
- [Contributions](#contributions)
4144

4245
<!-- No Table of Contents [toc] -->
4346

4447
<!-- Start SDK Installation [installation] -->
4548
## SDK Installation
4649

47-
> [!TIP]
48-
> To finish publishing your SDK to PyPI you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).
49-
50-
5150
> [!NOTE]
5251
> **Python version upgrade policy**
5352
>
@@ -60,15 +59,15 @@ The SDK can be installed with either *pip* or *poetry* package managers.
6059
*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
6160

6261
```bash
63-
pip install git+https://github.com/documenso/sdk-python.git
62+
pip install documenso_sdk
6463
```
6564

6665
### Poetry
6766

6867
*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
6968

7069
```bash
71-
poetry add git+https://github.com/documenso/sdk-python.git
70+
poetry add documenso_sdk
7271
```
7372

7473
### Shell and script usage with `uv`
@@ -115,8 +114,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
115114

116115
## Authentication
117116

118-
To use the SDK, you will need a Documenso API key which can be created [here](https://docs.documenso.com/developers/public-api/authentication#creating-an-api-key
119-
).
117+
To use the SDK, you will need a Documenso API key which can be created [here](https://docs.documenso.com/developers/public-api/authentication#creating-an-api-key).
120118

121119
```python
122120
import documenso_sdk
@@ -127,6 +125,7 @@ with Documenso(
127125
api_key=os.getenv("DOCUMENSO_API_KEY", ""),
128126
) as documenso:
129127
```
128+
130129
<!-- No Authentication [security] -->
131130

132131
## Document creation example
@@ -136,15 +135,102 @@ Currently creating a document involves two steps:
136135
1. Create the document
137136
2. Upload the PDF
138137

139-
This is a temporary measure, in the near future prior to the full release we will merge these two tasks into one request.
138+
This is a temporary measure, in the near future prior to the full release we will merge these two tasks into one request.
140139

141140
Here is a full example of the document creation process which you can copy and run.
142141

143-
Note that the function is temporarily called `createV0`, which will be replaced by `create` once we resolve the 2 step workaround.
142+
Note that the function is temporarily called `create_v0`, which will be replaced by `create` once we resolve the 2 step workaround.
144143

145144
```python
146-
# Todo
145+
from documenso_sdk import Documenso
146+
import os
147+
import requests
148+
149+
def upload_file_to_presigned_url(file_path: str, upload_url: str):
150+
"""Upload a file to a pre-signed URL."""
151+
with open(file_path, 'rb') as file:
152+
file_content = file.read()
153+
154+
response = requests.put(
155+
upload_url,
156+
data=file_content,
157+
headers={"Content-Type": "application/octet-stream"}
158+
)
159+
160+
if not response.ok:
161+
raise Exception(f"Upload failed with status: {response.status_code}")
162+
163+
async def main():
164+
with Documenso(
165+
# api_key=os.getenv("DOCUMENSO_API_KEY", ""),
166+
api_key="api_d61fxqsynan9ftcb",
167+
server_url="https://stg-app.documenso.com/api/v2-beta",
168+
) as documenso:
169+
170+
# Create document with recipients and fields
171+
create_document_response = documenso.documents.create_v0(
172+
title="Document title",
173+
recipients=[
174+
{
175+
"email": "example@documenso.com",
176+
"name": "Example Doe",
177+
"role": "SIGNER",
178+
"fields": [
179+
{
180+
"type": "SIGNATURE",
181+
"pageNumber": 1,
182+
"pageX": 10,
183+
"pageY": 10,
184+
"width": 10,
185+
"height": 10
186+
},
187+
{
188+
"type": "INITIALS",
189+
"pageNumber": 1,
190+
"pageX": 20,
191+
"pageY": 20,
192+
"width": 10,
193+
"height": 10
194+
}
195+
]
196+
},
197+
{
198+
"email": "admin@documenso.com",
199+
"name": "Admin Doe",
200+
"role": "APPROVER",
201+
"fields": [
202+
{
203+
"type": "SIGNATURE",
204+
"pageNumber": 1,
205+
"pageX": 10,
206+
"pageY": 50,
207+
"width": 10,
208+
"height": 10
209+
}
210+
]
211+
}
212+
],
213+
meta={
214+
"timezone": "Australia/Melbourne",
215+
"dateFormat": "MM/dd/yyyy hh:mm a",
216+
"language": "de",
217+
"subject": "Email subject",
218+
"message": "Email message",
219+
"emailSettings": {
220+
"recipientRemoved": False
221+
}
222+
}
223+
)
224+
225+
# Upload the PDF file
226+
upload_file_to_presigned_url("./demo.pdf", create_document_response.upload_url)
227+
228+
229+
if __name__ == "__main__":
230+
import asyncio
231+
asyncio.run(main())
147232
```
233+
148234
<!-- No SDK Example Usage [usage] -->
149235

150236
<!-- Start Available Resources and Operations [operations] -->
@@ -376,7 +462,7 @@ looking for the latest version.
376462

377463
## Contributions
378464

379-
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
380-
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
465+
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
466+
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
381467

382468
### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=documenso-sdk&utm_campaign=python)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "documenso_sdk"
3-
version = "0.0.2"
3+
version = "0.0.3"
44
description = "Python Client SDK Generated by Speakeasy."
55
authors = [{ name = "Speakeasy" },]
66
readme = "README-PYPI.md"

src/documenso_sdk/_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import importlib.metadata
44

55
__title__: str = "documenso_sdk"
6-
__version__: str = "0.0.2"
6+
__version__: str = "0.0.3"
77
__openapi_doc_version__: str = "0.0.0"
88
__gen_version__: str = "2.500.5"
9-
__user_agent__: str = "speakeasy-sdk/python 0.0.2 2.500.5 0.0.0 documenso_sdk"
9+
__user_agent__: str = "speakeasy-sdk/python 0.0.3 2.500.5 0.0.0 documenso_sdk"
1010

1111
try:
1212
if __package__ is not None:

0 commit comments

Comments
 (0)