Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.383.2 (#4)
Browse files Browse the repository at this point in the history
Co-authored-by: speakeasybot <[email protected]>
  • Loading branch information
github-actions[bot] and speakeasybot authored Aug 30, 2024
1 parent 9d48b50 commit fdc4809
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 60 deletions.
14 changes: 7 additions & 7 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: 2d5dbf5a-62be-411a-9c7b-bc7b6dc79e13
management:
docChecksum: 130845ee701d46932641282f72ec57ab
docVersion: v0.1.2
speakeasyVersion: 1.382.0
generationVersion: 2.404.11
releaseVersion: 0.1.6
configChecksum: 854f77d98a5a18662518beffbd1f9e41
docChecksum: 24fe39a0fb7794800b7d995f98944b86
docVersion: v0.1.3
speakeasyVersion: 1.383.2
generationVersion: 2.407.0
releaseVersion: 0.1.7
configChecksum: 6143927efa067c439ee8808c633660fd
repoURL: https://github.com/livepeer/livepeer-ai-python.git
installationURL: https://github.com/livepeer/livepeer-ai-python.git
features:
python:
additionalDependencies: 1.0.0
constsAndDefaults: 1.0.2
core: 5.4.1
core: 5.4.2
defaultEnabledRetries: 0.2.0
devContainers: 3.0.0
envVarSecurityUsage: 0.3.1
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
python:
version: 0.1.6
version: 0.1.7
additionalDependencies:
dev: {}
main: {}
Expand Down
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
speakeasyVersion: 1.382.0
speakeasyVersion: 1.383.2
sources:
livepeer_ai-OAS:
sourceNamespace: livepeer-ai-oas
sourceRevisionDigest: sha256:dbea8467cf8e1a0ef0cf767996b061733413ffc0b2a5857661ad41e0a51bd1b6
sourceBlobDigest: sha256:25056b91ebfc680137633064f5f3d767eb0bf6541a873d9e342013ed06a636ee
sourceRevisionDigest: sha256:dc8a34ad23c433035d3b919390f524abd2bc777cc8fc37ddcadbb0aada0b3615
sourceBlobDigest: sha256:6062f3b4ac6538ff6f4465a264f1806261e6509c5581be6c2189430acb21b315
tags:
- latest
- main
Expand All @@ -17,10 +17,10 @@ targets:
livepeer-ai-python:
source: livepeer_ai-OAS
sourceNamespace: livepeer-ai-oas
sourceRevisionDigest: sha256:dbea8467cf8e1a0ef0cf767996b061733413ffc0b2a5857661ad41e0a51bd1b6
sourceBlobDigest: sha256:25056b91ebfc680137633064f5f3d767eb0bf6541a873d9e342013ed06a636ee
sourceRevisionDigest: sha256:dc8a34ad23c433035d3b919390f524abd2bc777cc8fc37ddcadbb0aada0b3615
sourceBlobDigest: sha256:6062f3b4ac6538ff6f4465a264f1806261e6509c5581be6c2189430acb21b315
codeSamplesNamespace: code-samples-python-livepeer-python
codeSamplesRevisionDigest: sha256:38b96e9022d981c971387eb31adab018ee4a6db659c8544a926b00533be515bf
codeSamplesRevisionDigest: sha256:b20f0df201d0eac5b01b9624f45db9f37ecbf5f8945051415eba3fc171d06b07
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
Expand Down
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,20 @@ Welcome to the [Livepeer AI](https://livepeer.ai/) Python! This library offers a
<!-- Start SDK Installation [installation] -->
## SDK Installation

PIP
The SDK can be installed with either *pip* or *poetry* package managers.

### PIP

*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-ai-python.git
```

Poetry
### Poetry

*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-ai-python.git
```
Expand Down Expand Up @@ -199,10 +207,10 @@ try:
})

except models.HTTPError as e:
# handle exception
# handle e.data: models.HTTPErrorData
raise(e)
except models.HTTPValidationError as e:
# handle exception
# handle e.data: models.HTTPValidationErrorData
raise(e)
except models.SDKError as e:
# handle exception
Expand Down Expand Up @@ -399,6 +407,28 @@ s = LivepeerAI(debug_logger=logging.getLogger("livepeer_ai"))
```
<!-- End Debugging [debug] -->

<!-- Start Summary [summary] -->
## Summary

Livepeer AI Runner: An application to run AI pipelines
<!-- End Summary [summary] -->

<!-- Start Table of Contents [toc] -->
## Table of Contents

* [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)
<!-- End Table of Contents [toc] -->

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

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

## 2024-08-30 00:15:23
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.383.2 (2.407.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.1.7] .
31 changes: 1 addition & 30 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "livepeer-ai"
version = "0.1.6"
version = "0.1.7"
description = "Python Client SDK for the Livepeer AI API."
authors = ["Livepeer",]
readme = "README-PYPI.md"
Expand Down Expand Up @@ -28,7 +28,6 @@ typing-inspect = "^0.9.0"
[tool.poetry.group.dev.dependencies]
mypy = "==1.10.1"
pylint = "==3.2.3"
pyright = "==1.1.374"
types-python-dateutil = "^2.9.0.20240316"

[build-system]
Expand Down
8 changes: 4 additions & 4 deletions src/livepeer_ai/sdkconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class SDKConfiguration:
server_url: Optional[str] = ""
server_idx: Optional[int] = 0
language: str = "python"
openapi_doc_version: str = "v0.1.2"
sdk_version: str = "0.1.6"
gen_version: str = "2.404.11"
user_agent: str = "speakeasy-sdk/python 0.1.6 2.404.11 v0.1.2 livepeer-ai"
openapi_doc_version: str = "v0.1.3"
sdk_version: str = "0.1.7"
gen_version: str = "2.407.0"
user_agent: str = "speakeasy-sdk/python 0.1.7 2.407.0 v0.1.3 livepeer-ai"
retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET)
timeout_ms: Optional[int] = None

Expand Down
15 changes: 10 additions & 5 deletions src/livepeer_ai/utils/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]:
_parse_security_option(headers, query_params, value)
return headers, query_params
if metadata.scheme:
# Special case for basic auth which could be a flattened model
if metadata.sub_type == "basic" and not isinstance(value, BaseModel):
# Special case for basic auth or custom auth which could be a flattened model
if metadata.sub_type in ["basic", "custom"] and not isinstance(value, BaseModel):
_parse_security_scheme(headers, query_params, metadata, name, security)
else:
_parse_security_scheme(headers, query_params, metadata, name, value)
Expand Down Expand Up @@ -80,9 +80,12 @@ def _parse_security_scheme(
sub_type = scheme_metadata.sub_type

if isinstance(scheme, BaseModel):
if scheme_type == "http" and sub_type == "basic":
_parse_basic_auth_scheme(headers, scheme)
return
if scheme_type == "http":
if sub_type == "basic":
_parse_basic_auth_scheme(headers, scheme)
return
if sub_type == "custom":
return

scheme_fields: Dict[str, FieldInfo] = scheme.__class__.model_fields
for name in scheme_fields:
Expand Down Expand Up @@ -131,6 +134,8 @@ def _parse_security_scheme_value(
elif scheme_type == "http":
if sub_type == "bearer":
headers[header_name] = _apply_bearer(value)
elif sub_type == "custom":
return
else:
raise ValueError("sub type {sub_type} not supported")
else:
Expand Down

0 comments on commit fdc4809

Please sign in to comment.