Skip to content

sybaritic.status

Spartan protocol response status codes.

Status

Bases: IntEnum

Spartan response status codes.

CLIENT_ERROR class-attribute instance-attribute

CLIENT_ERROR = 4

Indicates that the request contains bad syntax or cannot be fulfilled.

REDIRECT class-attribute instance-attribute

REDIRECT = 3

Indicates that the resource is located at a different location on the same host.

SERVER_ERROR class-attribute instance-attribute

SERVER_ERROR = 5

Indicates that the server is unable to fulfill an otherwise valid request.

SUCCESS class-attribute instance-attribute

SUCCESS = 2

Indicates that the resource was successfully received, understood, and accepted.

is_client_error property

is_client_error: bool

Return True if status code indicates a client error.

is_error property

is_error: bool

Return True if status code indicates a client or server error.

is_redirect property

is_redirect: bool

Return True if status code indicates a redirect.

is_server_error property

is_server_error: bool

Return True if status code indicates a server error.

is_success property

is_success: bool

Return True if status code indicates success.