Skip to content

Commit 4fbc67d

Browse files
committed
feat: add setup method
1 parent cd51bba commit 4fbc67d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

interactions_restful/extension.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from .abc import BaseApi
99

10-
__all__ = ("APIExtension", )
10+
__all__ = ("APIClient", "setup")
1111
API_TYPE = TypeVar("API_TYPE", bound=BaseApi)
1212

1313

@@ -40,3 +40,5 @@ def _register_extension_routes(self):
4040
self.client.add_route(coro, data["endpoint"], data["method"], **data["kwargs"])
4141

4242

43+
def setup(client: Client, api: Type[API_TYPE], host: str, port: int, **kwargs) -> APIClient:
44+
return APIClient(client, api, host, port, **kwargs)

0 commit comments

Comments
 (0)