Skip to content

Commit b890ce2

Browse files
github-actions[bot]speakeasybotspeakeasy-github[bot]flemzord
authored
chore: 🐝 Update SDK - Generate 6.4.0 (#47)
* ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.617.1 * empty commit to trigger [run-tests] workflow * Update README.md --------- Co-authored-by: speakeasybot <[email protected]> Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com> Co-authored-by: Maxence Maireaux <[email protected]>
1 parent 6218321 commit b890ce2

Some content is hidden

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

67 files changed

+3497
-6062
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.env
2+
.env.local
13
**/__pycache__/
24
README-PYPI.md
35
**/.speakeasy/temp/

.speakeasy/gen.lock

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ id: 1e0c88f5-b1c8-4198-83d8-36bd00451cd3
33
management:
44
docChecksum: 2303b8447e474d428256a66f5ab2f945
55
docVersion: v3.0.5
6-
speakeasyVersion: 1.565.0
7-
generationVersion: 2.630.9
8-
releaseVersion: 6.3.1
9-
configChecksum: 1c7f48266aad475c205cf1af411d04aa
6+
speakeasyVersion: 1.617.1
7+
generationVersion: 2.701.8
8+
releaseVersion: 6.4.0
9+
configChecksum: d83c5cc9f192da616085309cdacc7240
1010
repoURL: https://github.com/formancehq/formance-sdk-python.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/formancehq/formance-sdk-python.git
@@ -16,29 +16,28 @@ features:
1616
additionalDependencies: 1.0.0
1717
bigint: 1.0.0
1818
constsAndDefaults: 1.0.5
19-
core: 5.19.3
19+
core: 5.20.4
2020
defaultEnabledRetries: 0.2.0
2121
deprecations: 3.0.2
2222
downloadStreams: 1.0.1
2323
enumUnions: 0.1.0
2424
envVarSecurityUsage: 0.3.2
25-
errors: 3.2.0
25+
errors: 3.3.3
2626
getRequestBodies: 3.0.0
27-
globalSecurity: 3.0.3
27+
globalSecurity: 3.0.4
2828
globalSecurityCallbacks: 1.0.0
2929
globalServerURLs: 3.1.1
3030
ignores: 3.0.1
3131
nameOverrides: 3.0.1
3232
nullables: 1.0.1
33-
oauth2ClientCredentials: 1.2.1
33+
oauth2ClientCredentials: 1.3.0
3434
responseFormat: 1.0.1
3535
retries: 3.0.2
3636
sdkHooks: 1.1.0
3737
unions: 3.0.4
3838
uploadStreams: 1.0.0
3939
generatedFiles:
4040
- .gitattributes
41-
- .python-version
4241
- .vscode/settings.json
4342
- USAGE.md
4443
- docs/models/errors/error.md
@@ -1047,8 +1046,11 @@ generatedFiles:
10471046
- src/formance_sdk_python/models/errors/__init__.py
10481047
- src/formance_sdk_python/models/errors/error.py
10491048
- src/formance_sdk_python/models/errors/errorresponse.py
1049+
- src/formance_sdk_python/models/errors/no_response_error.py
10501050
- src/formance_sdk_python/models/errors/paymentserrorresponse.py
10511051
- src/formance_sdk_python/models/errors/reconciliationerrorresponse.py
1052+
- src/formance_sdk_python/models/errors/responsevalidationerror.py
1053+
- src/formance_sdk_python/models/errors/sdkbaseerror.py
10521054
- src/formance_sdk_python/models/errors/sdkerror.py
10531055
- src/formance_sdk_python/models/errors/v2error.py
10541056
- src/formance_sdk_python/models/errors/v2errorresponse.py
@@ -1731,6 +1733,7 @@ generatedFiles:
17311733
- src/formance_sdk_python/utils/retries.py
17321734
- src/formance_sdk_python/utils/security.py
17331735
- src/formance_sdk_python/utils/serializers.py
1736+
- src/formance_sdk_python/utils/unmarshal_json_response.py
17341737
- src/formance_sdk_python/utils/url.py
17351738
- src/formance_sdk_python/utils/values.py
17361739
- src/formance_sdk_python/v3.py

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.565.0
1+
speakeasyVersion: 1.617.1
22
sources:
33
stacks-source:
44
sourceNamespace: stacks-source
5-
sourceRevisionDigest: sha256:112df29110fcab692d1ae2e445eb71bc723d0c06816ca0eb526fd28f1631f930
6-
sourceBlobDigest: sha256:675ba84c245ed56b7b1b5b2bd89af6529a8c9018f62f9f329f41d53ce0eb1049
5+
sourceRevisionDigest: sha256:fdd647ec761a320ea71c8b1d466fb5e760cf7f2b1296d3522d9d1706afb0e4c3
6+
sourceBlobDigest: sha256:b4f71aed3da317fc4aeaa3a423976f893198810336c71f2ffef1d630f1a925d4
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1750254471
9+
- speakeasy-sdk-regen-1754440427
1010
- v3.0.5
1111
targets:
1212
formance-python-sdk:
1313
source: stacks-source
1414
sourceNamespace: stacks-source
15-
sourceRevisionDigest: sha256:112df29110fcab692d1ae2e445eb71bc723d0c06816ca0eb526fd28f1631f930
16-
sourceBlobDigest: sha256:675ba84c245ed56b7b1b5b2bd89af6529a8c9018f62f9f329f41d53ce0eb1049
15+
sourceRevisionDigest: sha256:fdd647ec761a320ea71c8b1d466fb5e760cf7f2b1296d3522d9d1706afb0e4c3
16+
sourceBlobDigest: sha256:b4f71aed3da317fc4aeaa3a423976f893198810336c71f2ffef1d630f1a925d4
1717
codeSamplesNamespace: stacks-source-python-code-samples
18-
codeSamplesRevisionDigest: sha256:46e68b17f5c0bb9a63c0329639aef6571bd44d4f478c83f0529e876f84f81129
18+
codeSamplesRevisionDigest: sha256:d73562e29b0ae7d60cca0dface1abafeb6cb4f1b227e993acb9824e7b157d0bc
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

README-PYPI.md

Lines changed: 363 additions & 325 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 63 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@
77
</a>
88
</div>
99

10-
11-
## 🏗 **Welcome to your new SDK!** 🏗
12-
13-
It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:
14-
- [ ] 🛠 Make your SDK feel handcrafted by [customizing it](https://www.speakeasyapi.dev/docs/customize-sdks)
15-
- [ ] ♻️ Refine your SDK quickly by iterating locally with the [Speakeasy CLI](https://github.com/speakeasy-api/speakeasy)
16-
- [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasyapi.dev/docs/productionize-sdks/publish-sdks)
17-
- [ ] ✨ When ready to productionize, delete this section from the README
18-
1910
<!-- Start Summary [summary] -->
2011
## Summary
2112

@@ -65,7 +56,15 @@ and standard method from web, mobile and desktop applications.
6556
>
6657
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
6758
68-
The SDK can be installed with either *pip* or *poetry* package managers.
59+
The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
60+
61+
### uv
62+
63+
*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
64+
65+
```bash
66+
uv add formance-sdk-python
67+
```
6968

7069
### PIP
7170

@@ -153,7 +152,7 @@ with SDK(
153152

154153
</br>
155154

156-
The same SDK client can also be used to make asychronous requests by importing asyncio.
155+
The same SDK client can also be used to make asynchronous requests by importing asyncio.
157156
```python
158157
# Asynchronous Example
159158
import asyncio
@@ -563,26 +562,18 @@ with SDK(
563562
<!-- Start Error Handling [errors] -->
564563
## Error Handling
565564

566-
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
567-
568-
By default, an API error will raise a errors.SDKError exception, which has the following properties:
565+
[`SDKBaseError`](./src/formance_sdk_python/models/errors/sdkbaseerror.py) is the base class for all HTTP error responses. It has the following properties:
569566

570-
| Property | Type | Description |
571-
|-----------------|------------------|-----------------------|
572-
| `.status_code` | *int* | The HTTP status code |
573-
| `.message` | *str* | The error message |
574-
| `.raw_response` | *httpx.Response* | The raw HTTP response |
575-
| `.body` | *str* | The response content |
576-
577-
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `add_metadata_on_transaction_async` method may raise the following exceptions:
578-
579-
| Error Type | Status Code | Content Type |
580-
| ---------------------- | ----------- | ---------------- |
581-
| errors.V2ErrorResponse | default | application/json |
582-
| errors.SDKError | 4XX, 5XX | \*/\* |
567+
| Property | Type | Description |
568+
| ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
569+
| `err.message` | `str` | Error message |
570+
| `err.status_code` | `int` | HTTP response status code eg `404` |
571+
| `err.headers` | `httpx.Headers` | HTTP response headers |
572+
| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
573+
| `err.raw_response` | `httpx.Response` | Raw HTTP response |
574+
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
583575

584576
### Example
585-
586577
```python
587578
from formance_sdk_python import SDK
588579
from formance_sdk_python.models import errors, shared
@@ -611,13 +602,51 @@ with SDK(
611602
# Handle response
612603
print(res)
613604

614-
except errors.V2ErrorResponse as e:
615-
# handle e.data: errors.V2ErrorResponseData
616-
raise(e)
617-
except errors.SDKError as e:
618-
# handle exception
619-
raise(e)
605+
606+
except errors.SDKBaseError as e:
607+
# The base class for HTTP error responses
608+
print(e.message)
609+
print(e.status_code)
610+
print(e.body)
611+
print(e.headers)
612+
print(e.raw_response)
613+
614+
# Depending on the method different errors may be thrown
615+
if isinstance(e, errors.V2ErrorResponse):
616+
print(e.data.details) # Optional[str]
617+
print(e.data.error_code) # shared.V2ErrorsEnum
618+
print(e.data.error_message) # str
620619
```
620+
621+
### Error Classes
622+
**Primary error:**
623+
* [`SDKBaseError`](./src/formance_sdk_python/models/errors/sdkbaseerror.py): The base class for HTTP error responses.
624+
625+
<details><summary>Less common errors (14)</summary>
626+
627+
<br />
628+
629+
**Network errors:**
630+
* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
631+
* [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
632+
* [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
633+
634+
635+
**Inherit from [`SDKBaseError`](./src/formance_sdk_python/models/errors/sdkbaseerror.py)**:
636+
* [`V3ErrorResponse`](./src/formance_sdk_python/models/errors/v3errorresponse.py): Error. Applicable to 46 of 219 methods.*
637+
* [`PaymentsErrorResponse`](./src/formance_sdk_python/models/errors/paymentserrorresponse.py): Error. Applicable to 45 of 219 methods.*
638+
* [`V2ErrorResponse`](./src/formance_sdk_python/models/errors/v2errorresponse.py): Error. Applicable to 26 of 219 methods.*
639+
* [`ErrorResponse`](./src/formance_sdk_python/models/errors/errorresponse.py): Applicable to 19 of 219 methods.*
640+
* [`V2Error`](./src/formance_sdk_python/models/errors/v2error.py): General error. Applicable to 18 of 219 methods.*
641+
* [`Error`](./src/formance_sdk_python/models/errors/error.py): General error. Applicable to 17 of 219 methods.*
642+
* [`WalletsErrorResponse`](./src/formance_sdk_python/models/errors/walletserrorresponse.py): Applicable to 15 of 219 methods.*
643+
* [`ReconciliationErrorResponse`](./src/formance_sdk_python/models/errors/reconciliationerrorresponse.py): Error response. Applicable to 8 of 219 methods.*
644+
* [`WebhooksErrorResponse`](./src/formance_sdk_python/models/errors/webhookserrorresponse.py): Error. Applicable to 8 of 219 methods.*
645+
* [`ResponseValidationError`](./src/formance_sdk_python/models/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
646+
647+
</details>
648+
649+
\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
621650
<!-- End Error Handling [errors] -->
622651

623652
<!-- Start Server Selection [server] -->

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,14 @@ Based on:
218218
### Generated
219219
- [python v6.3.1] .
220220
### Releases
221-
- [PyPI v6.3.1] https://pypi.org/project/formance-sdk-python/6.3.1 - .
221+
- [PyPI v6.3.1] https://pypi.org/project/formance-sdk-python/6.3.1 - .
222+
223+
## 2025-09-17 00:28:25
224+
### Changes
225+
Based on:
226+
- OpenAPI Doc
227+
- Speakeasy CLI 1.617.1 (2.701.8) https://github.com/speakeasy-api/speakeasy
228+
### Generated
229+
- [python v6.4.0] .
230+
### Releases
231+
- [PyPI v6.4.0] https://pypi.org/project/formance-sdk-python/6.4.0 - .

USAGE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ with SDK(
2222

2323
</br>
2424

25-
The same SDK client can also be used to make asychronous requests by importing asyncio.
25+
The same SDK client can also be used to make asynchronous requests by importing asyncio.
2626
```python
2727
# Asynchronous Example
2828
import asyncio

docs/sdks/authv1/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Create client
2323

2424
### Example Usage
2525

26+
<!-- UsageSnippet language="python" operationID="createClient" method="post" path="/api/auth/clients" -->
2627
```python
2728
from formance_sdk_python import SDK
2829
from formance_sdk_python.models import shared
@@ -67,6 +68,7 @@ Add a secret to a client
6768

6869
### Example Usage
6970

71+
<!-- UsageSnippet language="python" operationID="createSecret" method="post" path="/api/auth/clients/{clientId}/secrets" -->
7072
```python
7173
from formance_sdk_python import SDK
7274
from formance_sdk_python.models import shared
@@ -113,6 +115,7 @@ Delete client
113115

114116
### Example Usage
115117

118+
<!-- UsageSnippet language="python" operationID="deleteClient" method="delete" path="/api/auth/clients/{clientId}" -->
116119
```python
117120
from formance_sdk_python import SDK
118121
from formance_sdk_python.models import shared
@@ -159,6 +162,7 @@ Delete a secret from a client
159162

160163
### Example Usage
161164

165+
<!-- UsageSnippet language="python" operationID="deleteSecret" method="delete" path="/api/auth/clients/{clientId}/secrets/{secretId}" -->
162166
```python
163167
from formance_sdk_python import SDK
164168
from formance_sdk_python.models import shared
@@ -206,6 +210,7 @@ Retrieve OpenID connect well-knowns.
206210

207211
### Example Usage
208212

213+
<!-- UsageSnippet language="python" operationID="getOIDCWellKnowns" method="get" path="/api/auth/.well-known/openid-configuration" -->
209214
```python
210215
from formance_sdk_python import SDK
211216
from formance_sdk_python.models import shared
@@ -249,6 +254,7 @@ Get server info
249254

250255
### Example Usage
251256

257+
<!-- UsageSnippet language="python" operationID="getServerInfo" method="get" path="/api/auth/_info" -->
252258
```python
253259
from formance_sdk_python import SDK
254260
from formance_sdk_python.models import shared
@@ -292,6 +298,7 @@ List clients
292298

293299
### Example Usage
294300

301+
<!-- UsageSnippet language="python" operationID="listClients" method="get" path="/api/auth/clients" -->
295302
```python
296303
from formance_sdk_python import SDK
297304
from formance_sdk_python.models import shared
@@ -335,6 +342,7 @@ List users
335342

336343
### Example Usage
337344

345+
<!-- UsageSnippet language="python" operationID="listUsers" method="get" path="/api/auth/users" -->
338346
```python
339347
from formance_sdk_python import SDK
340348
from formance_sdk_python.models import shared
@@ -378,6 +386,7 @@ Read client
378386

379387
### Example Usage
380388

389+
<!-- UsageSnippet language="python" operationID="readClient" method="get" path="/api/auth/clients/{clientId}" -->
381390
```python
382391
from formance_sdk_python import SDK
383392
from formance_sdk_python.models import shared
@@ -424,6 +433,7 @@ Read user
424433

425434
### Example Usage
426435

436+
<!-- UsageSnippet language="python" operationID="readUser" method="get" path="/api/auth/users/{userId}" -->
427437
```python
428438
from formance_sdk_python import SDK
429439
from formance_sdk_python.models import shared
@@ -470,6 +480,7 @@ Update client
470480

471481
### Example Usage
472482

483+
<!-- UsageSnippet language="python" operationID="updateClient" method="put" path="/api/auth/clients/{clientId}" -->
473484
```python
474485
from formance_sdk_python import SDK
475486
from formance_sdk_python.models import shared

0 commit comments

Comments
 (0)