File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class Settings(BaseSettings):
2222 )
2323
2424 env : ServiceEnvironment = ServiceEnvironment .LOCAL
25+ anyvar_uri : str = "http://localhost:8000"
2526
2627
2728@cache
Original file line number Diff line number Diff line change 88
99from anyvlm import __version__
1010from anyvlm .anyvar .base_client import BaseAnyVarClient
11+ from anyvlm .anyvar .http_client import HttpAnyVarClient
1112from anyvlm .config import get_config
1213from anyvlm .schemas .common import (
1314 SERVICE_DESCRIPTION ,
1819
1920
2021def create_anyvar_client (
21- connection_string : str = "http://localhost:8000" ,
22+ connection_string : str | None = None ,
2223) -> BaseAnyVarClient :
2324 """Construct new AnyVar client instance
2425
2526 :param connection_string: description of connection param
2627 :return: client instance
2728 """
29+ if not connection_string :
30+ connection_string = get_config ().anyvar_uri
31+ if connection_string .startswith ("http://" ):
32+ return HttpAnyVarClient (connection_string )
2833 raise NotImplementedError
2934
3035
You can’t perform that action at this time.
0 commit comments