Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/increase/_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: Increase) -> 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: AsyncIncrease
Expand All @@ -32,3 +37,6 @@ def __init__(self, client: AsyncIncrease) -> 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)