Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.109.0
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Oct 28, 2023
1 parent 4a492f8 commit aacec3a
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 9 deletions.
87 changes: 87 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,93 @@ return value of `Next` is `None`, then there are no more pages to be fetched.
Here's an example of one such pagination call:
<!-- End Pagination -->



<!-- Start Error Handling -->
# Error Handling

Handling errors in your SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.


<!-- End Error Handling -->



<!-- Start Server Selection -->
# Server Selection

## Select Server by Index

You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

| # | Server | Variables |
| - | ------ | --------- |
| 0 | `http://petstore.swagger.io/v1` | None |

For example:


```python
import test


s = test.Test(
server_idx=0
)


res = s.pets.create_pets()

if res.status_code == 200:
# handle response
pass
```


## Override Server URL Per-Client

The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:


```python
import test


s = test.Test(
server_url="http://petstore.swagger.io/v1"
)


res = s.pets.create_pets()

if res.status_code == 200:
# handle response
pass
```
<!-- End Server Selection -->



<!-- Start Custom HTTP Client -->
# Custom HTTP Client

The Python SDK makes API calls using the (requests)[https://pypi.org/project/requests/] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.


For example, you could specify a header for every request that your sdk makes as follows:

```python
import test
import requests

http_client = requests.Session()
http_client.headers.update({'x-custom-header': 'someValue'})
s = test.Test(client: http_client)
```


<!-- End Custom HTTP Client -->

<!-- Placeholder for Future Speakeasy SDK Sections -->


Expand Down
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,12 @@ Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.104.0 (2.169.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.9.0] .
- [python v0.9.0] .

## 2023-10-28 01:10:30
### Changes
Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.109.0 (2.173.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.9.1] .
8 changes: 4 additions & 4 deletions gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ configVersion: 1.0.0
management:
docChecksum: 2516596125ef223fbbef6c434d22eaac
docVersion: 1.0.0
speakeasyVersion: 1.104.0
generationVersion: 2.169.0
speakeasyVersion: 1.109.0
generationVersion: 2.173.0
generation:
comments:
disableComments: false
Expand All @@ -15,10 +15,10 @@ generation:
tagNamespacingDisabled: false
features:
python:
core: 3.3.0
core: 3.3.1
globalServerURLs: 2.82.0
python:
version: 0.9.0
version: 0.9.1
author: my-test
clientServerStatusCodesAsErrors: true
description: Python Client SDK Generated by Speakeasy
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setuptools.setup(
name="test",
version="0.9.0",
version="0.9.1",
author="my-test",
description="Python Client SDK Generated by Speakeasy",
long_description=long_description,
Expand Down
6 changes: 3 additions & 3 deletions src/test/sdkconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class SDKConfiguration:
server_idx: int = 0
language: str = 'python'
openapi_doc_version: str = '1.0.0'
sdk_version: str = '0.9.0'
gen_version: str = '2.169.0'
user_agent: str = 'speakeasy-sdk/python 0.9.0 2.169.0 1.0.0 test'
sdk_version: str = '0.9.1'
gen_version: str = '2.173.0'
user_agent: str = 'speakeasy-sdk/python 0.9.1 2.173.0 1.0.0 test'
retry_config: RetryConfig = None

def get_server_details(self) -> Tuple[str, Dict[str, str]]:
Expand Down

0 comments on commit aacec3a

Please sign in to comment.