diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c42d433..506f7b0 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,14 +1,15 @@ lockVersion: 2.0.0 id: 8c3ff122-1fb8-439c-8680-989f956dfd8d management: - docChecksum: 435fd84a2b3131f1117db532d7dc36aa + docChecksum: a4f46cb330dd59f1f60caa6eaccdbd3b docVersion: 1.0.0 - speakeasyVersion: 1.398.1 + speakeasyVersion: 1.399.0 generationVersion: 2.415.8 - releaseVersion: 0.2.0 - configChecksum: 274e324c9ee60c7fda251c90665003b3 + releaseVersion: 0.3.0 + configChecksum: e2a3f034034c8b68bbb6d9b34363d9f6 repoURL: https://github.com/livepeer/livepeer-python.git installationURL: https://github.com/livepeer/livepeer-python.git + published: true features: python: additionalDependencies: 1.0.0 @@ -26,7 +27,6 @@ features: globalSecurityFlattening: 1.0.0 globalServerURLs: 3.0.0 inputOutputModels: 3.0.0 - methodSecurity: 3.0.0 multipartFileContentType: 1.0.0 nameOverrides: 3.0.0 nullables: 1.0.0 @@ -289,17 +289,11 @@ generatedFiles: - docs/models/operations/deletewebhookresponse.md - docs/models/operations/from_.md - docs/models/operations/genaudiototextresponse.md - - docs/models/operations/genaudiototextsecurity.md - docs/models/operations/genimagetoimageresponse.md - - docs/models/operations/genimagetoimagesecurity.md - docs/models/operations/genimagetovideoresponse.md - - docs/models/operations/genimagetovideosecurity.md - docs/models/operations/gensegmentanything2response.md - - docs/models/operations/gensegmentanything2security.md - docs/models/operations/gentexttoimageresponse.md - - docs/models/operations/gentexttoimagesecurity.md - docs/models/operations/genupscaleresponse.md - - docs/models/operations/genupscalesecurity.md - docs/models/operations/getassetrequest.md - docs/models/operations/getassetresponse.md - docs/models/operations/getassetsresponse.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 55120e7..4301118 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true python: - version: 0.2.0 + version: 0.3.0 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index b89bf15..4a9c227 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,17 +1,18 @@ -speakeasyVersion: 1.398.1 +speakeasyVersion: 1.399.0 sources: livepeer-studio-api: sourceNamespace: livepeer-studio-api - sourceRevisionDigest: sha256:a3526ec2de6aec694c70ec0f0eabff4e4fd3bed4c106366a7e9ec4d127f93adb - sourceBlobDigest: sha256:2f90b2238bc559477e75134c6c63fe740188463a049ff343c3a0d252ccbd7645 + sourceRevisionDigest: sha256:05b8e6f32af10787d3e904f94a0924c304ec1dd8357de9351eebd75f8ea9c3ca + sourceBlobDigest: sha256:aa27f19cd706fdbc92320eea5ca4d28aefd20557554f78a6fa0393320d8ee1d6 tags: - latest + - main targets: livepeer-python: source: livepeer-studio-api sourceNamespace: livepeer-studio-api - sourceRevisionDigest: sha256:a3526ec2de6aec694c70ec0f0eabff4e4fd3bed4c106366a7e9ec4d127f93adb - sourceBlobDigest: sha256:2f90b2238bc559477e75134c6c63fe740188463a049ff343c3a0d252ccbd7645 + sourceRevisionDigest: sha256:05b8e6f32af10787d3e904f94a0924c304ec1dd8357de9351eebd75f8ea9c3ca + sourceBlobDigest: sha256:aa27f19cd706fdbc92320eea5ca4d28aefd20557554f78a6fa0393320d8ee1d6 my-first-target: source: livepeer-studio-api sourceNamespace: livepeer-studio-api @@ -31,5 +32,8 @@ workflow: livepeer-python: target: python source: livepeer-studio-api + publish: + pypi: + token: $pypi_token codeSamples: output: codeSamples.yaml diff --git a/README.md b/README.md index 06235b2..04f41e3 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The SDK can be installed with either *pip* or *poetry* package managers. *PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line. ```bash -pip install git+https://github.com/livepeer/livepeer-python.git +pip install livepeer ``` ### Poetry @@ -25,7 +25,7 @@ pip install git+https://github.com/livepeer/livepeer-python.git *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. ```bash -poetry add git+https://github.com/livepeer/livepeer-python.git +poetry add livepeer ``` @@ -175,13 +175,12 @@ Certain SDK methods accept file objects as part of a request body or multi-part ```python from livepeer import Livepeer -from livepeer.models import operations -s = Livepeer() +s = Livepeer( + api_key="", +) -res = s.generate.image_to_image(security=operations.GenImageToImageSecurity( - http_bearer="", -), request={ +res = s.generate.image_to_image(request={ "prompt": "", "image": { "file_name": "example.file", @@ -575,27 +574,6 @@ if res.stream is not None: # handle response pass -``` - -### Per-Operation Security Schemes - -Some operations in this SDK require the security scheme to be specified at the request level. For example: -```python -from livepeer import Livepeer -from livepeer.models import operations - -s = Livepeer() - -res = s.generate.text_to_image(security=operations.GenTextToImageSecurity( - http_bearer="", -), request={ - "prompt": "", -}) - -if res.image_response is not None: - # handle response - pass - ``` @@ -610,39 +588,17 @@ what they return. ## Table of Contents -- [Livepeer Python Library](#livepeer-python-library) - - [Documentation](#documentation) - - [SDK Installation](#sdk-installation) - - [PIP](#pip) - - [Poetry](#poetry) - - [SDK Example Usage](#sdk-example-usage) - - [Example](#example) - - [Available Resources and Operations](#available-resources-and-operations) - - [access\_control](#access_control) - - [asset](#asset) - - [generate](#generate) - - [metrics](#metrics) - - [multistream](#multistream) - - [playback](#playback) - - [~~room~~](#room) - - [session](#session) - - [stream](#stream) - - [task](#task) - - [transcode](#transcode) - - [webhook](#webhook) - - [File uploads](#file-uploads) - - [Retries](#retries) - - [Error Handling](#error-handling) - - [Example](#example-1) - - [Custom HTTP Client](#custom-http-client) - - [Authentication](#authentication) - - [Per-Client Security Schemes](#per-client-security-schemes) - - [Per-Operation Security Schemes](#per-operation-security-schemes) - - [Summary](#summary) - - [Table of Contents](#table-of-contents) - - [IDE Support](#ide-support) - - [PyCharm](#pycharm) - - [Debugging](#debugging) +* [SDK Installation](#sdk-installation) +* [IDE Support](#ide-support) +* [SDK Example Usage](#sdk-example-usage) +* [Available Resources and Operations](#available-resources-and-operations) +* [File uploads](#file-uploads) +* [Retries](#retries) +* [Error Handling](#error-handling) +* [Server Selection](#server-selection) +* [Custom HTTP Client](#custom-http-client) +* [Authentication](#authentication) +* [Debugging](#debugging) diff --git a/RELEASES.md b/RELEASES.md index 2e0b137..f5c4cca 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -94,4 +94,14 @@ Based on: - OpenAPI Doc - Speakeasy CLI 1.398.1 (2.415.8) https://github.com/speakeasy-api/speakeasy ### Generated -- [python v0.2.0] . \ No newline at end of file +- [python v0.2.0] . + +## 2024-09-17 20:54:48 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.399.0 (2.415.8) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.3.0] . +### Releases +- [PyPI v0.3.0] https://pypi.org/project/livepeer/0.3.0 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 1c270b0..71546ae 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -95,13 +95,12 @@ actions: label: genAudioToText source: |- from livepeer import Livepeer - from livepeer.models import operations - s = Livepeer() + s = Livepeer( + api_key="", + ) - res = s.generate.audio_to_text(security=operations.GenAudioToTextSecurity( - http_bearer="", - ), request={ + res = s.generate.audio_to_text(request={ "audio": { "file_name": "example.file", "content": open("example.file", "rb"), @@ -118,13 +117,12 @@ actions: label: genImageToImage source: |- from livepeer import Livepeer - from livepeer.models import operations - s = Livepeer() + s = Livepeer( + api_key="", + ) - res = s.generate.image_to_image(security=operations.GenImageToImageSecurity( - http_bearer="", - ), request={ + res = s.generate.image_to_image(request={ "prompt": "", "image": { "file_name": "example.file", @@ -142,13 +140,12 @@ actions: label: genImageToVideo source: |- from livepeer import Livepeer - from livepeer.models import operations - s = Livepeer() + s = Livepeer( + api_key="", + ) - res = s.generate.image_to_video(security=operations.GenImageToVideoSecurity( - http_bearer="", - ), request={ + res = s.generate.image_to_video(request={ "image": { "file_name": "example.file", "content": open("example.file", "rb"), @@ -165,13 +162,12 @@ actions: label: genSegmentAnything2 source: |- from livepeer import Livepeer - from livepeer.models import operations - s = Livepeer() + s = Livepeer( + api_key="", + ) - res = s.generate.segment_anything2(security=operations.GenSegmentAnything2Security( - http_bearer="", - ), request={ + res = s.generate.segment_anything2(request={ "image": { "file_name": "example.file", "content": open("example.file", "rb"), @@ -188,13 +184,12 @@ actions: label: genTextToImage source: |- from livepeer import Livepeer - from livepeer.models import operations - s = Livepeer() + s = Livepeer( + api_key="", + ) - res = s.generate.text_to_image(security=operations.GenTextToImageSecurity( - http_bearer="", - ), request={ + res = s.generate.text_to_image(request={ "prompt": "", }) @@ -208,13 +203,12 @@ actions: label: genUpscale source: |- from livepeer import Livepeer - from livepeer.models import operations - s = Livepeer() + s = Livepeer( + api_key="", + ) - res = s.generate.upscale(security=operations.GenUpscaleSecurity( - http_bearer="", - ), request={ + res = s.generate.upscale(request={ "prompt": "", "image": { "file_name": "example.file", diff --git a/docs/models/components/security.md b/docs/models/components/security.md index 2e0839d..c698674 100644 --- a/docs/models/components/security.md +++ b/docs/models/components/security.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `api_key` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `api_key` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/genaudiototextsecurity.md b/docs/models/operations/genaudiototextsecurity.md deleted file mode 100644 index ee3cd58..0000000 --- a/docs/models/operations/genaudiototextsecurity.md +++ /dev/null @@ -1,8 +0,0 @@ -# GenAudioToTextSecurity - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `http_bearer` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/genimagetoimagesecurity.md b/docs/models/operations/genimagetoimagesecurity.md deleted file mode 100644 index 555d042..0000000 --- a/docs/models/operations/genimagetoimagesecurity.md +++ /dev/null @@ -1,8 +0,0 @@ -# GenImageToImageSecurity - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `http_bearer` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/genimagetovideosecurity.md b/docs/models/operations/genimagetovideosecurity.md deleted file mode 100644 index 5c5ab18..0000000 --- a/docs/models/operations/genimagetovideosecurity.md +++ /dev/null @@ -1,8 +0,0 @@ -# GenImageToVideoSecurity - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `http_bearer` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/gensegmentanything2security.md b/docs/models/operations/gensegmentanything2security.md deleted file mode 100644 index 567abc7..0000000 --- a/docs/models/operations/gensegmentanything2security.md +++ /dev/null @@ -1,8 +0,0 @@ -# GenSegmentAnything2Security - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `http_bearer` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/gentexttoimagesecurity.md b/docs/models/operations/gentexttoimagesecurity.md deleted file mode 100644 index 2fb7979..0000000 --- a/docs/models/operations/gentexttoimagesecurity.md +++ /dev/null @@ -1,8 +0,0 @@ -# GenTextToImageSecurity - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `http_bearer` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/genupscalesecurity.md b/docs/models/operations/genupscalesecurity.md deleted file mode 100644 index ed7d93a..0000000 --- a/docs/models/operations/genupscalesecurity.md +++ /dev/null @@ -1,8 +0,0 @@ -# GenUpscaleSecurity - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `http_bearer` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/generate/README.md b/docs/sdks/generate/README.md index 845cc54..90da4a1 100644 --- a/docs/sdks/generate/README.md +++ b/docs/sdks/generate/README.md @@ -22,13 +22,12 @@ Generate images from text prompts. ```python from livepeer import Livepeer -from livepeer.models import operations -s = Livepeer() +s = Livepeer( + api_key="", +) -res = s.generate.text_to_image(security=operations.GenTextToImageSecurity( - http_bearer="", -), request={ +res = s.generate.text_to_image(request={ "prompt": "", }) @@ -40,11 +39,10 @@ if res.image_response is not None: ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `request` | [components.TextToImageParams](../../models/components/texttoimageparams.md) | :heavy_check_mark: | The request object to use for the request. | -| `security` | [operations.GenTextToImageSecurity](../../models/operations/gentexttoimagesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `request` | [components.TextToImageParams](../../models/components/texttoimageparams.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -69,13 +67,12 @@ Apply image transformations to a provided image. ```python from livepeer import Livepeer -from livepeer.models import operations -s = Livepeer() +s = Livepeer( + api_key="", +) -res = s.generate.image_to_image(security=operations.GenImageToImageSecurity( - http_bearer="", -), request={ +res = s.generate.image_to_image(request={ "prompt": "", "image": { "file_name": "example.file", @@ -91,11 +88,10 @@ if res.image_response is not None: ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `request` | [components.BodyGenImageToImage](../../models/components/bodygenimagetoimage.md) | :heavy_check_mark: | The request object to use for the request. | -| `security` | [operations.GenImageToImageSecurity](../../models/operations/genimagetoimagesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `request` | [components.BodyGenImageToImage](../../models/components/bodygenimagetoimage.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -120,13 +116,12 @@ Generate a video from a provided image. ```python from livepeer import Livepeer -from livepeer.models import operations -s = Livepeer() +s = Livepeer( + api_key="", +) -res = s.generate.image_to_video(security=operations.GenImageToVideoSecurity( - http_bearer="", -), request={ +res = s.generate.image_to_video(request={ "image": { "file_name": "example.file", "content": open("example.file", "rb"), @@ -141,11 +136,10 @@ if res.video_response is not None: ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `request` | [components.BodyGenImageToVideo](../../models/components/bodygenimagetovideo.md) | :heavy_check_mark: | The request object to use for the request. | -| `security` | [operations.GenImageToVideoSecurity](../../models/operations/genimagetovideosecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `request` | [components.BodyGenImageToVideo](../../models/components/bodygenimagetovideo.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -170,13 +164,12 @@ Upscale an image by increasing its resolution. ```python from livepeer import Livepeer -from livepeer.models import operations -s = Livepeer() +s = Livepeer( + api_key="", +) -res = s.generate.upscale(security=operations.GenUpscaleSecurity( - http_bearer="", -), request={ +res = s.generate.upscale(request={ "prompt": "", "image": { "file_name": "example.file", @@ -192,11 +185,10 @@ if res.image_response is not None: ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `request` | [components.BodyGenUpscale](../../models/components/bodygenupscale.md) | :heavy_check_mark: | The request object to use for the request. | -| `security` | [operations.GenUpscaleSecurity](../../models/operations/genupscalesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `request` | [components.BodyGenUpscale](../../models/components/bodygenupscale.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -221,13 +213,12 @@ Transcribe audio files to text. ```python from livepeer import Livepeer -from livepeer.models import operations -s = Livepeer() +s = Livepeer( + api_key="", +) -res = s.generate.audio_to_text(security=operations.GenAudioToTextSecurity( - http_bearer="", -), request={ +res = s.generate.audio_to_text(request={ "audio": { "file_name": "example.file", "content": open("example.file", "rb"), @@ -242,11 +233,10 @@ if res.text_response is not None: ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `request` | [components.BodyGenAudioToText](../../models/components/bodygenaudiototext.md) | :heavy_check_mark: | The request object to use for the request. | -| `security` | [operations.GenAudioToTextSecurity](../../models/operations/genaudiototextsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `request` | [components.BodyGenAudioToText](../../models/components/bodygenaudiototext.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -272,13 +262,12 @@ Segment objects in an image. ```python from livepeer import Livepeer -from livepeer.models import operations -s = Livepeer() +s = Livepeer( + api_key="", +) -res = s.generate.segment_anything2(security=operations.GenSegmentAnything2Security( - http_bearer="", -), request={ +res = s.generate.segment_anything2(request={ "image": { "file_name": "example.file", "content": open("example.file", "rb"), @@ -293,11 +282,10 @@ if res.masks_response is not None: ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `request` | [components.BodyGenSegmentAnything2](../../models/components/bodygensegmentanything2.md) | :heavy_check_mark: | The request object to use for the request. | -| `security` | [operations.GenSegmentAnything2Security](../../models/operations/gensegmentanything2security.md) | :heavy_check_mark: | The security requirements to use for the request. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `request` | [components.BodyGenSegmentAnything2](../../models/components/bodygensegmentanything2.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/pyproject.toml b/pyproject.toml index e4e1056..0c2e12b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "livepeer" -version = "0.2.0" +version = "0.3.0" description = "Python Client SDK for Livepeer Studio" authors = ["Speakeasy",] readme = "README-PYPI.md" diff --git a/src/livepeer/generate.py b/src/livepeer/generate.py index c1bf852..425b7fa 100644 --- a/src/livepeer/generate.py +++ b/src/livepeer/generate.py @@ -14,10 +14,6 @@ class Generate(BaseSDK): def text_to_image( self, *, - security: Union[ - operations.GenTextToImageSecurity, - operations.GenTextToImageSecurityTypedDict, - ], request: Union[ components.TextToImageParams, components.TextToImageParamsTypedDict ], @@ -29,7 +25,6 @@ def text_to_image( Generate images from text prompts. - :param security: :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -58,9 +53,7 @@ def text_to_image( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", - security=utils.get_pydantic_model( - security, operations.GenTextToImageSecurity - ), + security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.TextToImageParams ), @@ -79,7 +72,7 @@ def text_to_image( hook_ctx=HookContext( operation_id="genTextToImage", oauth2_scopes=[], - security_source=security, + security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], @@ -141,10 +134,6 @@ def text_to_image( async def text_to_image_async( self, *, - security: Union[ - operations.GenTextToImageSecurity, - operations.GenTextToImageSecurityTypedDict, - ], request: Union[ components.TextToImageParams, components.TextToImageParamsTypedDict ], @@ -156,7 +145,6 @@ async def text_to_image_async( Generate images from text prompts. - :param security: :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -185,9 +173,7 @@ async def text_to_image_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", - security=utils.get_pydantic_model( - security, operations.GenTextToImageSecurity - ), + security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.TextToImageParams ), @@ -206,7 +192,7 @@ async def text_to_image_async( hook_ctx=HookContext( operation_id="genTextToImage", oauth2_scopes=[], - security_source=security, + security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], @@ -268,10 +254,6 @@ async def text_to_image_async( def image_to_image( self, *, - security: Union[ - operations.GenImageToImageSecurity, - operations.GenImageToImageSecurityTypedDict, - ], request: Union[ components.BodyGenImageToImage, components.BodyGenImageToImageTypedDict ], @@ -283,7 +265,6 @@ def image_to_image( Apply image transformations to a provided image. - :param security: :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -312,9 +293,7 @@ def image_to_image( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", - security=utils.get_pydantic_model( - security, operations.GenImageToImageSecurity - ), + security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenImageToImage ), @@ -333,7 +312,7 @@ def image_to_image( hook_ctx=HookContext( operation_id="genImageToImage", oauth2_scopes=[], - security_source=security, + security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], @@ -396,10 +375,6 @@ def image_to_image( async def image_to_image_async( self, *, - security: Union[ - operations.GenImageToImageSecurity, - operations.GenImageToImageSecurityTypedDict, - ], request: Union[ components.BodyGenImageToImage, components.BodyGenImageToImageTypedDict ], @@ -411,7 +386,6 @@ async def image_to_image_async( Apply image transformations to a provided image. - :param security: :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -440,9 +414,7 @@ async def image_to_image_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", - security=utils.get_pydantic_model( - security, operations.GenImageToImageSecurity - ), + security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenImageToImage ), @@ -461,7 +433,7 @@ async def image_to_image_async( hook_ctx=HookContext( operation_id="genImageToImage", oauth2_scopes=[], - security_source=security, + security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], @@ -524,10 +496,6 @@ async def image_to_image_async( def image_to_video( self, *, - security: Union[ - operations.GenImageToVideoSecurity, - operations.GenImageToVideoSecurityTypedDict, - ], request: Union[ components.BodyGenImageToVideo, components.BodyGenImageToVideoTypedDict ], @@ -539,7 +507,6 @@ def image_to_video( Generate a video from a provided image. - :param security: :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -568,9 +535,7 @@ def image_to_video( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", - security=utils.get_pydantic_model( - security, operations.GenImageToVideoSecurity - ), + security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenImageToVideo ), @@ -589,7 +554,7 @@ def image_to_video( hook_ctx=HookContext( operation_id="genImageToVideo", oauth2_scopes=[], - security_source=security, + security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], @@ -652,10 +617,6 @@ def image_to_video( async def image_to_video_async( self, *, - security: Union[ - operations.GenImageToVideoSecurity, - operations.GenImageToVideoSecurityTypedDict, - ], request: Union[ components.BodyGenImageToVideo, components.BodyGenImageToVideoTypedDict ], @@ -667,7 +628,6 @@ async def image_to_video_async( Generate a video from a provided image. - :param security: :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -696,9 +656,7 @@ async def image_to_video_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", - security=utils.get_pydantic_model( - security, operations.GenImageToVideoSecurity - ), + security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenImageToVideo ), @@ -717,7 +675,7 @@ async def image_to_video_async( hook_ctx=HookContext( operation_id="genImageToVideo", oauth2_scopes=[], - security_source=security, + security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], @@ -780,9 +738,6 @@ async def image_to_video_async( def upscale( self, *, - security: Union[ - operations.GenUpscaleSecurity, operations.GenUpscaleSecurityTypedDict - ], request: Union[components.BodyGenUpscale, components.BodyGenUpscaleTypedDict], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -792,7 +747,6 @@ def upscale( Upscale an image by increasing its resolution. - :param security: :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -821,7 +775,7 @@ def upscale( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", - security=utils.get_pydantic_model(security, operations.GenUpscaleSecurity), + security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenUpscale ), @@ -838,7 +792,9 @@ def upscale( http_res = self.do_request( hook_ctx=HookContext( - operation_id="genUpscale", oauth2_scopes=[], security_source=security + operation_id="genUpscale", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], @@ -900,9 +856,6 @@ def upscale( async def upscale_async( self, *, - security: Union[ - operations.GenUpscaleSecurity, operations.GenUpscaleSecurityTypedDict - ], request: Union[components.BodyGenUpscale, components.BodyGenUpscaleTypedDict], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -912,7 +865,6 @@ async def upscale_async( Upscale an image by increasing its resolution. - :param security: :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -941,7 +893,7 @@ async def upscale_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", - security=utils.get_pydantic_model(security, operations.GenUpscaleSecurity), + security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenUpscale ), @@ -958,7 +910,9 @@ async def upscale_async( http_res = await self.do_request_async( hook_ctx=HookContext( - operation_id="genUpscale", oauth2_scopes=[], security_source=security + operation_id="genUpscale", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], @@ -1020,10 +974,6 @@ async def upscale_async( def audio_to_text( self, *, - security: Union[ - operations.GenAudioToTextSecurity, - operations.GenAudioToTextSecurityTypedDict, - ], request: Union[ components.BodyGenAudioToText, components.BodyGenAudioToTextTypedDict ], @@ -1035,7 +985,6 @@ def audio_to_text( Transcribe audio files to text. - :param security: :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1064,9 +1013,7 @@ def audio_to_text( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", - security=utils.get_pydantic_model( - security, operations.GenAudioToTextSecurity - ), + security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenAudioToText ), @@ -1085,7 +1032,7 @@ def audio_to_text( hook_ctx=HookContext( operation_id="genAudioToText", oauth2_scopes=[], - security_source=security, + security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["400", "401", "413", "422", "4XX", "500", "5XX"], @@ -1153,10 +1100,6 @@ def audio_to_text( async def audio_to_text_async( self, *, - security: Union[ - operations.GenAudioToTextSecurity, - operations.GenAudioToTextSecurityTypedDict, - ], request: Union[ components.BodyGenAudioToText, components.BodyGenAudioToTextTypedDict ], @@ -1168,7 +1111,6 @@ async def audio_to_text_async( Transcribe audio files to text. - :param security: :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1197,9 +1139,7 @@ async def audio_to_text_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", - security=utils.get_pydantic_model( - security, operations.GenAudioToTextSecurity - ), + security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenAudioToText ), @@ -1218,7 +1158,7 @@ async def audio_to_text_async( hook_ctx=HookContext( operation_id="genAudioToText", oauth2_scopes=[], - security_source=security, + security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["400", "401", "413", "422", "4XX", "500", "5XX"], @@ -1286,10 +1226,6 @@ async def audio_to_text_async( def segment_anything2( self, *, - security: Union[ - operations.GenSegmentAnything2Security, - operations.GenSegmentAnything2SecurityTypedDict, - ], request: Union[ components.BodyGenSegmentAnything2, components.BodyGenSegmentAnything2TypedDict, @@ -1302,7 +1238,6 @@ def segment_anything2( Segment objects in an image. - :param security: :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1331,9 +1266,7 @@ def segment_anything2( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", - security=utils.get_pydantic_model( - security, operations.GenSegmentAnything2Security - ), + security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenSegmentAnything2 ), @@ -1352,7 +1285,7 @@ def segment_anything2( hook_ctx=HookContext( operation_id="genSegmentAnything2", oauth2_scopes=[], - security_source=security, + security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], @@ -1416,10 +1349,6 @@ def segment_anything2( async def segment_anything2_async( self, *, - security: Union[ - operations.GenSegmentAnything2Security, - operations.GenSegmentAnything2SecurityTypedDict, - ], request: Union[ components.BodyGenSegmentAnything2, components.BodyGenSegmentAnything2TypedDict, @@ -1432,7 +1361,6 @@ async def segment_anything2_async( Segment objects in an image. - :param security: :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1461,9 +1389,7 @@ async def segment_anything2_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", - security=utils.get_pydantic_model( - security, operations.GenSegmentAnything2Security - ), + security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenSegmentAnything2 ), @@ -1482,7 +1408,7 @@ async def segment_anything2_async( hook_ctx=HookContext( operation_id="genSegmentAnything2", oauth2_scopes=[], - security_source=security, + security_source=self.sdk_configuration.security, ), request=req, error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], diff --git a/src/livepeer/models/components/security.py b/src/livepeer/models/components/security.py index 2650431..690666d 100644 --- a/src/livepeer/models/components/security.py +++ b/src/livepeer/models/components/security.py @@ -3,17 +3,17 @@ from __future__ import annotations from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, SecurityMetadata -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import TypedDict +from typing_extensions import Annotated class SecurityTypedDict(TypedDict): - api_key: NotRequired[str] + api_key: str class Security(BaseModel): api_key: Annotated[ - Optional[str], + str, FieldMetadata( security=SecurityMetadata( scheme=True, @@ -22,4 +22,4 @@ class Security(BaseModel): field_name="Authorization", ) ), - ] = None + ] diff --git a/src/livepeer/models/operations/__init__.py b/src/livepeer/models/operations/__init__.py index 08fa35a..6a7c8da 100644 --- a/src/livepeer/models/operations/__init__.py +++ b/src/livepeer/models/operations/__init__.py @@ -73,42 +73,15 @@ DeleteWebhookResponse, DeleteWebhookResponseTypedDict, ) -from .genaudiototext import ( - GenAudioToTextResponse, - GenAudioToTextResponseTypedDict, - GenAudioToTextSecurity, - GenAudioToTextSecurityTypedDict, -) -from .genimagetoimage import ( - GenImageToImageResponse, - GenImageToImageResponseTypedDict, - GenImageToImageSecurity, - GenImageToImageSecurityTypedDict, -) -from .genimagetovideo import ( - GenImageToVideoResponse, - GenImageToVideoResponseTypedDict, - GenImageToVideoSecurity, - GenImageToVideoSecurityTypedDict, -) +from .genaudiototext import GenAudioToTextResponse, GenAudioToTextResponseTypedDict +from .genimagetoimage import GenImageToImageResponse, GenImageToImageResponseTypedDict +from .genimagetovideo import GenImageToVideoResponse, GenImageToVideoResponseTypedDict from .gensegmentanything2 import ( GenSegmentAnything2Response, GenSegmentAnything2ResponseTypedDict, - GenSegmentAnything2Security, - GenSegmentAnything2SecurityTypedDict, -) -from .gentexttoimage import ( - GenTextToImageResponse, - GenTextToImageResponseTypedDict, - GenTextToImageSecurity, - GenTextToImageSecurityTypedDict, -) -from .genupscale import ( - GenUpscaleResponse, - GenUpscaleResponseTypedDict, - GenUpscaleSecurity, - GenUpscaleSecurityTypedDict, ) +from .gentexttoimage import GenTextToImageResponse, GenTextToImageResponseTypedDict +from .genupscale import GenUpscaleResponse, GenUpscaleResponseTypedDict from .getasset import ( GetAssetRequest, GetAssetRequestTypedDict, @@ -417,28 +390,16 @@ "FromTypedDict", "GenAudioToTextResponse", "GenAudioToTextResponseTypedDict", - "GenAudioToTextSecurity", - "GenAudioToTextSecurityTypedDict", "GenImageToImageResponse", "GenImageToImageResponseTypedDict", - "GenImageToImageSecurity", - "GenImageToImageSecurityTypedDict", "GenImageToVideoResponse", "GenImageToVideoResponseTypedDict", - "GenImageToVideoSecurity", - "GenImageToVideoSecurityTypedDict", "GenSegmentAnything2Response", "GenSegmentAnything2ResponseTypedDict", - "GenSegmentAnything2Security", - "GenSegmentAnything2SecurityTypedDict", "GenTextToImageResponse", "GenTextToImageResponseTypedDict", - "GenTextToImageSecurity", - "GenTextToImageSecurityTypedDict", "GenUpscaleResponse", "GenUpscaleResponseTypedDict", - "GenUpscaleSecurity", - "GenUpscaleSecurityTypedDict", "GetAssetRequest", "GetAssetRequestTypedDict", "GetAssetResponse", diff --git a/src/livepeer/models/operations/genaudiototext.py b/src/livepeer/models/operations/genaudiototext.py index 82e6ff9..8fbeab6 100644 --- a/src/livepeer/models/operations/genaudiototext.py +++ b/src/livepeer/models/operations/genaudiototext.py @@ -7,30 +7,11 @@ ) from livepeer.models.errors import studio_api_error as errors_studio_api_error from livepeer.types import BaseModel -from livepeer.utils import FieldMetadata, SecurityMetadata import pydantic from typing import Optional, TypedDict from typing_extensions import Annotated, NotRequired -class GenAudioToTextSecurityTypedDict(TypedDict): - http_bearer: str - - -class GenAudioToTextSecurity(BaseModel): - http_bearer: Annotated[ - str, - FieldMetadata( - security=SecurityMetadata( - scheme=True, - scheme_type="http", - sub_type="bearer", - field_name="Authorization", - ) - ), - ] - - class GenAudioToTextResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict text_response: NotRequired[components_textresponse.TextResponseTypedDict] diff --git a/src/livepeer/models/operations/genimagetoimage.py b/src/livepeer/models/operations/genimagetoimage.py index 3919c57..b70cc0e 100644 --- a/src/livepeer/models/operations/genimagetoimage.py +++ b/src/livepeer/models/operations/genimagetoimage.py @@ -7,30 +7,11 @@ ) from livepeer.models.errors import studio_api_error as errors_studio_api_error from livepeer.types import BaseModel -from livepeer.utils import FieldMetadata, SecurityMetadata import pydantic from typing import Optional, TypedDict from typing_extensions import Annotated, NotRequired -class GenImageToImageSecurityTypedDict(TypedDict): - http_bearer: str - - -class GenImageToImageSecurity(BaseModel): - http_bearer: Annotated[ - str, - FieldMetadata( - security=SecurityMetadata( - scheme=True, - scheme_type="http", - sub_type="bearer", - field_name="Authorization", - ) - ), - ] - - class GenImageToImageResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict image_response: NotRequired[components_imageresponse.ImageResponseTypedDict] diff --git a/src/livepeer/models/operations/genimagetovideo.py b/src/livepeer/models/operations/genimagetovideo.py index 0ed08c5..7b3e8bd 100644 --- a/src/livepeer/models/operations/genimagetovideo.py +++ b/src/livepeer/models/operations/genimagetovideo.py @@ -7,30 +7,11 @@ ) from livepeer.models.errors import studio_api_error as errors_studio_api_error from livepeer.types import BaseModel -from livepeer.utils import FieldMetadata, SecurityMetadata import pydantic from typing import Optional, TypedDict from typing_extensions import Annotated, NotRequired -class GenImageToVideoSecurityTypedDict(TypedDict): - http_bearer: str - - -class GenImageToVideoSecurity(BaseModel): - http_bearer: Annotated[ - str, - FieldMetadata( - security=SecurityMetadata( - scheme=True, - scheme_type="http", - sub_type="bearer", - field_name="Authorization", - ) - ), - ] - - class GenImageToVideoResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict video_response: NotRequired[components_videoresponse.VideoResponseTypedDict] diff --git a/src/livepeer/models/operations/gensegmentanything2.py b/src/livepeer/models/operations/gensegmentanything2.py index b8580cf..d2eb36d 100644 --- a/src/livepeer/models/operations/gensegmentanything2.py +++ b/src/livepeer/models/operations/gensegmentanything2.py @@ -7,30 +7,11 @@ ) from livepeer.models.errors import studio_api_error as errors_studio_api_error from livepeer.types import BaseModel -from livepeer.utils import FieldMetadata, SecurityMetadata import pydantic from typing import Optional, TypedDict from typing_extensions import Annotated, NotRequired -class GenSegmentAnything2SecurityTypedDict(TypedDict): - http_bearer: str - - -class GenSegmentAnything2Security(BaseModel): - http_bearer: Annotated[ - str, - FieldMetadata( - security=SecurityMetadata( - scheme=True, - scheme_type="http", - sub_type="bearer", - field_name="Authorization", - ) - ), - ] - - class GenSegmentAnything2ResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict masks_response: NotRequired[components_masksresponse.MasksResponseTypedDict] diff --git a/src/livepeer/models/operations/gentexttoimage.py b/src/livepeer/models/operations/gentexttoimage.py index 1d32efb..a9d3376 100644 --- a/src/livepeer/models/operations/gentexttoimage.py +++ b/src/livepeer/models/operations/gentexttoimage.py @@ -7,30 +7,11 @@ ) from livepeer.models.errors import studio_api_error as errors_studio_api_error from livepeer.types import BaseModel -from livepeer.utils import FieldMetadata, SecurityMetadata import pydantic from typing import Optional, TypedDict from typing_extensions import Annotated, NotRequired -class GenTextToImageSecurityTypedDict(TypedDict): - http_bearer: str - - -class GenTextToImageSecurity(BaseModel): - http_bearer: Annotated[ - str, - FieldMetadata( - security=SecurityMetadata( - scheme=True, - scheme_type="http", - sub_type="bearer", - field_name="Authorization", - ) - ), - ] - - class GenTextToImageResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict image_response: NotRequired[components_imageresponse.ImageResponseTypedDict] diff --git a/src/livepeer/models/operations/genupscale.py b/src/livepeer/models/operations/genupscale.py index 1a9eeaf..30252fd 100644 --- a/src/livepeer/models/operations/genupscale.py +++ b/src/livepeer/models/operations/genupscale.py @@ -7,30 +7,11 @@ ) from livepeer.models.errors import studio_api_error as errors_studio_api_error from livepeer.types import BaseModel -from livepeer.utils import FieldMetadata, SecurityMetadata import pydantic from typing import Optional, TypedDict from typing_extensions import Annotated, NotRequired -class GenUpscaleSecurityTypedDict(TypedDict): - http_bearer: str - - -class GenUpscaleSecurity(BaseModel): - http_bearer: Annotated[ - str, - FieldMetadata( - security=SecurityMetadata( - scheme=True, - scheme_type="http", - sub_type="bearer", - field_name="Authorization", - ) - ), - ] - - class GenUpscaleResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict image_response: NotRequired[components_imageresponse.ImageResponseTypedDict] diff --git a/src/livepeer/sdk.py b/src/livepeer/sdk.py index c4a6882..faf0ec6 100644 --- a/src/livepeer/sdk.py +++ b/src/livepeer/sdk.py @@ -59,7 +59,7 @@ class Livepeer(BaseSDK): def __init__( self, - api_key: Optional[Union[Optional[str], Callable[[], Optional[str]]]] = None, + api_key: Union[str, Callable[[], str]], server_idx: Optional[int] = None, server_url: Optional[str] = None, url_params: Optional[Dict[str, str]] = None, diff --git a/src/livepeer/sdkconfiguration.py b/src/livepeer/sdkconfiguration.py index 0f4fe6b..beaa6e3 100644 --- a/src/livepeer/sdkconfiguration.py +++ b/src/livepeer/sdkconfiguration.py @@ -28,9 +28,9 @@ class SDKConfiguration: server_idx: Optional[int] = 0 language: str = "python" openapi_doc_version: str = "1.0.0" - sdk_version: str = "0.2.0" + sdk_version: str = "0.3.0" gen_version: str = "2.415.8" - user_agent: str = "speakeasy-sdk/python 0.2.0 2.415.8 1.0.0 livepeer" + user_agent: str = "speakeasy-sdk/python 0.3.0 2.415.8 1.0.0 livepeer" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None