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

ParameterTypeDescription
name`strNone`
methodstrHTTP method. Supported values are GET, POST, PUT, PATCH, and DELETE.
path`strNone`
authstrInvocation auth mode. Supported values are api_key, workspace, and public.
mode`strNone`
timeout`intNone`
timeout_seconds`intNone`
docsboolStore endpoint documentation metadata for future docs generation.
enabledboolWhether the endpoint can be invoked.

Methods

endpoint_config(target) -> Any
endpoint_config.to_payload() -> dict[str, Any]
MethodDescription
__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}

On this page