Client¶
The aggregator SignTrakerClient is the primary entry point. It lazily creates
and caches one sub-client per resource group. All sub-clients subclass
BaseClient, which owns the HTTP transport.
signtraker.client.SignTrakerClient ¶
SignTrakerClient(api_key: Optional[str] = None, base_url: Optional[str] = None, *, subdomain: Optional[str] = None, load_dotenv: bool = False, timeout_seconds: Optional[float] = None, max_retries: Optional[int] = None, retry_backoff_seconds: Optional[float] = None)
Primary entry point exposing all SignTraker resource groups.
Each resource group is exposed as a lazily instantiated, cached property.
The base URL is tenant-specific, so provide either base_url or
subdomain (or set SIGNTRAKER_BASE_URL / SIGNTRAKER_SUBDOMAIN).
Example
Initialize the aggregator client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
Optional[str]
|
API key; falls back to the |
None
|
base_url
|
Optional[str]
|
Full API base URL (e.g.
|
None
|
subdomain
|
Optional[str]
|
Tenant subdomain used to build the base URL when
|
None
|
load_dotenv
|
bool
|
Opt-in load of a |
False
|
timeout_seconds
|
Optional[float]
|
Default timeout propagated to all sub-clients. |
None
|
max_retries
|
Optional[int]
|
Retry attempts propagated to all sub-clients. |
None
|
retry_backoff_seconds
|
Optional[float]
|
Backoff propagated to all sub-clients. |
None
|
Raises:
| Type | Description |
|---|---|
ImportError
|
If |
Source code in signtraker/client.py
signtraker.base_client.BaseClient ¶
BaseClient(api_key: Optional[str] = None, base_url: Optional[str] = None, *, subdomain: Optional[str] = None, timeout_seconds: Optional[float] = None, max_retries: Optional[int] = None, retry_backoff_seconds: Optional[float] = None)
Base client with shared request/response handling.
Resolves authentication and the tenant-specific base URL, then exposes thin HTTP verb helpers used by every resource client.
Initialize the base client.
The base URL is resolved from the first available of: base_url,
subdomain (expanded to https://{subdomain}.signtraker.com), the
SIGNTRAKER_BASE_URL env var, or the SIGNTRAKER_SUBDOMAIN env var.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
Optional[str]
|
API key. Falls back to the |
None
|
base_url
|
Optional[str]
|
Full API base URL (e.g.
|
None
|
subdomain
|
Optional[str]
|
Tenant subdomain used to build the base URL when
|
None
|
timeout_seconds
|
Optional[float]
|
Per-request timeout. Falls back to env/default. |
None
|
max_retries
|
Optional[int]
|
Retry attempts for transient failures. |
None
|
retry_backoff_seconds
|
Optional[float]
|
Base backoff between retries (exponential). |
None
|
Raises:
| Type | Description |
|---|---|
AuthenticationError
|
If no API key can be resolved. |
SignTrakerConfigError
|
If no base URL or subdomain can be resolved. |
Source code in signtraker/base_client.py
get ¶
get(endpoint: str, params: Optional[Dict[str, Any]] = None, *, timeout_seconds: Optional[float] = None) -> Any
Make a GET request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
endpoint
|
str
|
Path relative to the base URL. |
required |
params
|
Optional[Dict[str, Any]]
|
Query-string parameters. |
None
|
timeout_seconds
|
Optional[float]
|
Per-request timeout override. |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
The parsed response payload. |
Source code in signtraker/base_client.py
post ¶
post(endpoint: str, *, json_data: Optional[Union[Dict[str, Any], List[Any]]] = None, params: Optional[Dict[str, Any]] = None, timeout_seconds: Optional[float] = None) -> Any
Make a POST request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
endpoint
|
str
|
Path relative to the base URL. |
required |
json_data
|
Optional[Union[Dict[str, Any], List[Any]]]
|
JSON-serializable request body. |
None
|
params
|
Optional[Dict[str, Any]]
|
Query-string parameters. |
None
|
timeout_seconds
|
Optional[float]
|
Per-request timeout override. |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
The parsed response payload. |
Source code in signtraker/base_client.py
put ¶
put(endpoint: str, *, json_data: Optional[Union[Dict[str, Any], List[Any]]] = None, params: Optional[Dict[str, Any]] = None, timeout_seconds: Optional[float] = None) -> Any
Make a PUT request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
endpoint
|
str
|
Path relative to the base URL. |
required |
json_data
|
Optional[Union[Dict[str, Any], List[Any]]]
|
JSON-serializable request body. |
None
|
params
|
Optional[Dict[str, Any]]
|
Query-string parameters. |
None
|
timeout_seconds
|
Optional[float]
|
Per-request timeout override. |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
The parsed response payload. |
Source code in signtraker/base_client.py
patch ¶
patch(endpoint: str, *, json_data: Optional[Union[Dict[str, Any], List[Any]]] = None, params: Optional[Dict[str, Any]] = None, content_type: Optional[str] = None, timeout_seconds: Optional[float] = None) -> Any
Make a PATCH request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
endpoint
|
str
|
Path relative to the base URL. |
required |
json_data
|
Optional[Union[Dict[str, Any], List[Any]]]
|
JSON-serializable request body. |
None
|
params
|
Optional[Dict[str, Any]]
|
Query-string parameters. |
None
|
content_type
|
Optional[str]
|
Optional |
None
|
timeout_seconds
|
Optional[float]
|
Per-request timeout override. |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
The parsed response payload. |
Source code in signtraker/base_client.py
delete ¶
delete(endpoint: str, *, params: Optional[Dict[str, Any]] = None, timeout_seconds: Optional[float] = None) -> Any
Make a DELETE request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
endpoint
|
str
|
Path relative to the base URL. |
required |
params
|
Optional[Dict[str, Any]]
|
Query-string parameters. |
None
|
timeout_seconds
|
Optional[float]
|
Per-request timeout override. |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
The parsed response payload. |