Skip to content

Commit d004d7b

Browse files
authored
Merge pull request #186 from AllenNeuralDynamics/rpc-client-settings
Externalize the settings for the RPC client
2 parents abd83e9 + 6f080d3 commit d004d7b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/clabe/rpc/_client.py

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

88
from pydantic import BaseModel, Field, HttpUrl, SecretStr
99

10+
from ..services import ServiceSettings
1011
from .models import (
1112
FileBulkDeleteResponse,
1213
FileDeleteResponse,
@@ -22,11 +23,13 @@
2223
logger = logging.getLogger(__name__)
2324

2425

25-
class RpcClientSettings(BaseModel):
26+
class RpcClientSettings(ServiceSettings):
2627
"""Settings for RPC client configuration."""
2728

28-
server_url: HttpUrl = Field(..., description="URL of the RPC server (e.g., http://127.0.0.1:8000)")
29-
token: SecretStr = Field(..., description="Authentication token for RPC access")
29+
__yml_section__ = "rpc_client"
30+
31+
server_url: HttpUrl = Field(description="URL of the RPC server (e.g., http://127.0.0.1:8000)")
32+
token: SecretStr = Field(description="Authentication token for RPC access")
3033
timeout: float = Field(default=30.0, description="Default timeout for RPC calls in seconds")
3134
poll_interval: float = Field(default=0.5, description="Polling interval for job status checks in seconds")
3235
max_file_size: int = Field(default=5 * 1024 * 1024, description="Maximum file size in bytes (default 5MB)")

0 commit comments

Comments
 (0)