Skip to content

Commit

Permalink
chore(internal): minor update (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored and rattrayalex committed Sep 12, 2023
1 parent b0d95d7 commit 2eb35d9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/anthropic/_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

import time
import asyncio
from typing import TYPE_CHECKING

if TYPE_CHECKING:
Expand All @@ -20,6 +22,9 @@ def __init__(self, client: Anthropic) -> None:
self._delete = client.delete
self._get_api_list = client.get_api_list

def _sleep(self, seconds: float) -> None:
time.sleep(seconds)


class AsyncAPIResource:
_client: AsyncAnthropic
Expand All @@ -32,3 +37,6 @@ def __init__(self, client: AsyncAnthropic) -> None:
self._put = client.put
self._delete = client.delete
self._get_api_list = client.get_api_list

async def _sleep(self, seconds: float) -> None:
await asyncio.sleep(seconds)

0 comments on commit 2eb35d9

Please sign in to comment.