Skip to content

Commit

Permalink
Release 0.0.1-beta12
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Sep 11, 2024
1 parent 1f1d345 commit 021be76
Show file tree
Hide file tree
Showing 125 changed files with 15,421 additions and 2,537 deletions.
28 changes: 21 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ pip install gooeyai
Instantiate and use the client with the following:

```python
from gooey import Gooey
from gooey import DeforumSdPageRequestAnimationPromptsItem, Gooey

client = Gooey(
api_key="YOUR_API_KEY",
)
client.post_v3video_bots_async()
client.animate(
animation_prompts=[
DeforumSdPageRequestAnimationPromptsItem(
frame="frame",
prompt="prompt",
)
],
)
```

## Async Client
Expand All @@ -31,15 +38,22 @@ The SDK also exports an `async` client so that you can make non-blocking calls t
```python
import asyncio

from gooey import AsyncGooey
from gooey import AsyncGooey, DeforumSdPageRequestAnimationPromptsItem

client = AsyncGooey(
api_key="YOUR_API_KEY",
)


async def main() -> None:
await client.post_v3video_bots_async()
await client.animate(
animation_prompts=[
DeforumSdPageRequestAnimationPromptsItem(
frame="frame",
prompt="prompt",
)
],
)


asyncio.run(main())
Expand All @@ -54,7 +68,7 @@ will be thrown.
from gooey.core.api_error import ApiError

try:
client.post_v3video_bots_async(...)
client.animate(...)
except ApiError as e:
print(e.status_code)
print(e.body)
Expand All @@ -77,7 +91,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
Use the `max_retries` request option to configure this behavior.

```python
client.post_v3video_bots_async(..., {
client.animate(..., {
"max_retries": 1
})
```
Expand All @@ -97,7 +111,7 @@ client = Gooey(


# Override timeout for a specific method
client.post_v3video_bots_async(..., {
client.animate(..., {
"timeout_in_seconds": 1
})
```
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gooeyai"
version = "0.0.1-beta11"
version = "0.0.1-beta12"
description = ""
readme = "README.md"
authors = []
Expand Down
Loading

0 comments on commit 021be76

Please sign in to comment.