rebase.EndpointConfig
HTTP endpoint configuration for functions, workflows, and models.
Signature
class rebase.EndpointConfig(
*,
name: str | None = None,
method: str = "POST",
path: str | None = None,
auth: str = "api_key",
mode: str | None = None,
timeout: int | None = None,
timeout_seconds: int | None = None,
docs: bool = False,
enabled: bool = True,
)Most code should create endpoint configs with rebase.endpoint(...).
Parameters
| Parameter | Type | Description |
|---|---|---|
name | `str | None` |
method | str | HTTP method. Supported values are GET, POST, PUT, PATCH, and DELETE. |
path | `str | None` |
auth | str | Invocation auth mode. Supported values are api_key, workspace, and public. |
mode | `str | None` |
timeout | `int | None` |
timeout_seconds | `int | None` |
docs | bool | Store endpoint documentation metadata for future docs generation. |
enabled | bool | Whether the endpoint can be invoked. |
Methods
endpoint_config(target) -> Any
endpoint_config.to_payload() -> dict[str, Any]| Method | Description |
|---|---|
__call__(target) | Attach this endpoint config to a function, workflow, or model target. |
to_payload() | Return the serialized endpoint config sent to Rebase. |
Usage
import rebase as rb
@rb.function(project="forecasting", endpoint=rb.endpoint(path="/forecast"))
def forecast(zone: str = "SE3") -> dict:
return {"zone": zone}
