guardrails_ai.sdk.methods ========================= .. py:module:: guardrails_ai.sdk.methods Functions --------- .. autoapisummary:: guardrails_ai.sdk.methods.delete_guard guardrails_ai.sdk.methods.get_guard guardrails_ai.sdk.methods.get_guards guardrails_ai.sdk.methods.post_guard guardrails_ai.sdk.methods.post_guard_validate guardrails_ai.sdk.methods.put_guard Module Contents --------------- .. py:function:: delete_guard(*, client: httpx.AsyncClient, id: str) -> Any :async: Delete a Guard via the API. :param client: The async HTTP client to use for the request. :param id: The unique id of the Guard to be deleted. :returns: The raw JSON response parsed as a Python object. :raises httpx.HTTPStatusError: If the server returns a 4xx or 5xx response. .. py:function:: get_guard(*, client: httpx.AsyncClient, id: str) -> Any :async: Fetch a Guard by id from the API. :param client: The async HTTP client to use for the request. :param id: The id of the Guard to retrieve. :returns: The raw JSON response parsed as a Python object. :raises httpx.HTTPStatusError: If the server returns a 4xx or 5xx response. .. py:function:: get_guards(*, client: httpx.AsyncClient, name: Optional[str] = None) -> Any :async: Fetch a Guard by id from the API. :param client: The async HTTP client to use for the request. :param id: The id of the Guard to retrieve. :returns: The raw JSON response parsed as a Python object. :raises httpx.HTTPStatusError: If the server returns a 4xx or 5xx response. .. py:function:: post_guard(*, client: httpx.AsyncClient, body: dict[str, Any]) -> Any :async: Create a Guard via the API. :param client: The async HTTP client to use for the request. :param body: The request body to create a Guard. :returns: The raw JSON response parsed as a Python object. :raises httpx.HTTPStatusError: If the server returns a 4xx or 5xx response. .. py:function:: post_guard_validate(*, client: httpx.AsyncClient, id: str, body: dict[str, Any]) -> Any :async: Submit content to a Guard for validation. :param client: The async HTTP client to use for the request. :param id: The unique id of the Guard to validate against. :param body: The request body, including ``llm_output`` and any additional fields. :returns: The raw JSON response parsed as a Python object. :raises httpx.HTTPStatusError: If the server returns a 4xx or 5xx response. .. py:function:: put_guard(*, client: httpx.AsyncClient, id: str, body: dict[str, Any]) -> Any :async: Update a Guard via the API. :param client: The async HTTP client to use for the request. :param id: The unique id of the Guard to be updated. :param body: The updated Guard definition. :returns: The raw JSON response parsed as a Python object. :raises httpx.HTTPStatusError: If the server returns a 4xx or 5xx response.