Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 2.1.6 #49

Merged
merged 10 commits into from
Dec 18, 2024
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.1.5"
".": "2.1.6"
}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 2.1.6 (2024-12-18)

Full Changelog: [v2.1.5...v2.1.6](https://github.com/runwayml/sdk-python/compare/v2.1.5...v2.1.6)

### Chores

* **internal:** codegen related update ([#48](https://github.com/runwayml/sdk-python/issues/48)) ([f999274](https://github.com/runwayml/sdk-python/commit/f999274cbc241f063e3f6abdd7bef93749066c05))
* **internal:** codegen related update ([#50](https://github.com/runwayml/sdk-python/issues/50)) ([187e174](https://github.com/runwayml/sdk-python/commit/187e1747d62dc99718de5d2dfb5bc8fa8291ab34))
* **internal:** codegen related update ([#51](https://github.com/runwayml/sdk-python/issues/51)) ([1c70164](https://github.com/runwayml/sdk-python/commit/1c701642c7797d49ce59bc938b0f18511f3c6d9e))
* **internal:** codegen related update ([#52](https://github.com/runwayml/sdk-python/issues/52)) ([07e7dda](https://github.com/runwayml/sdk-python/commit/07e7ddaae96eb26063a88e6bc23adef2f9b0e7d5))
* **internal:** codegen related update ([#54](https://github.com/runwayml/sdk-python/issues/54)) ([5540248](https://github.com/runwayml/sdk-python/commit/55402489160f4cb43244f90e5f85c90bd96a7729))
* **internal:** codegen related update ([#55](https://github.com/runwayml/sdk-python/issues/55)) ([75daba1](https://github.com/runwayml/sdk-python/commit/75daba1936f201824daec2b8b08abf68a52b55d7))
* **internal:** codegen related update ([#56](https://github.com/runwayml/sdk-python/issues/56)) ([c98ed80](https://github.com/runwayml/sdk-python/commit/c98ed80958344be95507a3c5ef7ede3006cf6bf5))
* **internal:** fix some typos ([#58](https://github.com/runwayml/sdk-python/issues/58)) ([404c771](https://github.com/runwayml/sdk-python/commit/404c771242c581f9c618966a03b5de5f5db8a5da))


### Documentation

* **readme:** example snippet for client context manager ([#57](https://github.com/runwayml/sdk-python/issues/57)) ([e62b5e9](https://github.com/runwayml/sdk-python/commit/e62b5e9d1176d72c7285ede6200436bc994260ae))

## 2.1.5 (2024-12-13)

Full Changelog: [v2.1.4...v2.1.5](https://github.com/runwayml/sdk-python/compare/v2.1.4...v2.1.5)
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,16 @@ client.with_options(http_client=DefaultHttpxClient(...))

By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.

```py
from runwayml import RunwayML

with RunwayML() as client:
# make requests here
...

# HTTP client is now closed
```

## Versioning

This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "runwayml"
version = "2.1.5"
version = "2.1.6"
description = "The official Python library for the runwayml API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
36 changes: 18 additions & 18 deletions src/runwayml/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import httpx

from . import resources, _exceptions
from . import _exceptions
from ._qs import Querystring
from ._types import (
NOT_GIVEN,
Expand All @@ -24,6 +24,7 @@
get_async_library,
)
from ._version import __version__
from .resources import tasks, image_to_video
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
from ._exceptions import RunwayMLError, APIStatusError
from ._base_client import (
Expand All @@ -37,7 +38,6 @@
"Transport",
"ProxiesTypes",
"RequestOptions",
"resources",
"RunwayML",
"AsyncRunwayML",
"Client",
Expand All @@ -46,8 +46,8 @@


class RunwayML(SyncAPIClient):
tasks: resources.TasksResource
image_to_video: resources.ImageToVideoResource
tasks: tasks.TasksResource
image_to_video: image_to_video.ImageToVideoResource
with_raw_response: RunwayMLWithRawResponse
with_streaming_response: RunwayMLWithStreamedResponse

Expand Down Expand Up @@ -111,8 +111,8 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)

self.tasks = resources.TasksResource(self)
self.image_to_video = resources.ImageToVideoResource(self)
self.tasks = tasks.TasksResource(self)
self.image_to_video = image_to_video.ImageToVideoResource(self)
self.with_raw_response = RunwayMLWithRawResponse(self)
self.with_streaming_response = RunwayMLWithStreamedResponse(self)

Expand Down Expand Up @@ -225,8 +225,8 @@ def _make_status_error(


class AsyncRunwayML(AsyncAPIClient):
tasks: resources.AsyncTasksResource
image_to_video: resources.AsyncImageToVideoResource
tasks: tasks.AsyncTasksResource
image_to_video: image_to_video.AsyncImageToVideoResource
with_raw_response: AsyncRunwayMLWithRawResponse
with_streaming_response: AsyncRunwayMLWithStreamedResponse

Expand Down Expand Up @@ -290,8 +290,8 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)

self.tasks = resources.AsyncTasksResource(self)
self.image_to_video = resources.AsyncImageToVideoResource(self)
self.tasks = tasks.AsyncTasksResource(self)
self.image_to_video = image_to_video.AsyncImageToVideoResource(self)
self.with_raw_response = AsyncRunwayMLWithRawResponse(self)
self.with_streaming_response = AsyncRunwayMLWithStreamedResponse(self)

Expand Down Expand Up @@ -405,26 +405,26 @@ def _make_status_error(

class RunwayMLWithRawResponse:
def __init__(self, client: RunwayML) -> None:
self.tasks = resources.TasksResourceWithRawResponse(client.tasks)
self.image_to_video = resources.ImageToVideoResourceWithRawResponse(client.image_to_video)
self.tasks = tasks.TasksResourceWithRawResponse(client.tasks)
self.image_to_video = image_to_video.ImageToVideoResourceWithRawResponse(client.image_to_video)


class AsyncRunwayMLWithRawResponse:
def __init__(self, client: AsyncRunwayML) -> None:
self.tasks = resources.AsyncTasksResourceWithRawResponse(client.tasks)
self.image_to_video = resources.AsyncImageToVideoResourceWithRawResponse(client.image_to_video)
self.tasks = tasks.AsyncTasksResourceWithRawResponse(client.tasks)
self.image_to_video = image_to_video.AsyncImageToVideoResourceWithRawResponse(client.image_to_video)


class RunwayMLWithStreamedResponse:
def __init__(self, client: RunwayML) -> None:
self.tasks = resources.TasksResourceWithStreamingResponse(client.tasks)
self.image_to_video = resources.ImageToVideoResourceWithStreamingResponse(client.image_to_video)
self.tasks = tasks.TasksResourceWithStreamingResponse(client.tasks)
self.image_to_video = image_to_video.ImageToVideoResourceWithStreamingResponse(client.image_to_video)


class AsyncRunwayMLWithStreamedResponse:
def __init__(self, client: AsyncRunwayML) -> None:
self.tasks = resources.AsyncTasksResourceWithStreamingResponse(client.tasks)
self.image_to_video = resources.AsyncImageToVideoResourceWithStreamingResponse(client.image_to_video)
self.tasks = tasks.AsyncTasksResourceWithStreamingResponse(client.tasks)
self.image_to_video = image_to_video.AsyncImageToVideoResourceWithStreamingResponse(client.image_to_video)


Client = RunwayML
Expand Down
2 changes: 1 addition & 1 deletion src/runwayml/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "runwayml"
__version__ = "2.1.5" # x-release-please-version
__version__ = "2.1.6" # x-release-please-version
8 changes: 4 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,11 @@ def test_default_query_option(self) -> None:
FinalRequestOptions(
method="get",
url="/foo",
params={"foo": "baz", "query_param": "overriden"},
params={"foo": "baz", "query_param": "overridden"},
)
)
url = httpx.URL(request.url)
assert dict(url.params) == {"foo": "baz", "query_param": "overriden"}
assert dict(url.params) == {"foo": "baz", "query_param": "overridden"}

def test_request_extra_json(self) -> None:
request = self.client._build_request(
Expand Down Expand Up @@ -1137,11 +1137,11 @@ def test_default_query_option(self) -> None:
FinalRequestOptions(
method="get",
url="/foo",
params={"foo": "baz", "query_param": "overriden"},
params={"foo": "baz", "query_param": "overridden"},
)
)
url = httpx.URL(request.url)
assert dict(url.params) == {"foo": "baz", "query_param": "overriden"}
assert dict(url.params) == {"foo": "baz", "query_param": "overridden"}

def test_request_extra_json(self) -> None:
request = self.client._build_request(
Expand Down
Loading