Skip to main content

Module pagination

Module pagination 

Source
Expand description

Shared pagination types and parsing for list endpoints.

This module provides the common pagination types (Pagination, PaginationError, PaginationErrorResponse, PaginationErrorDetails) and parsing functions (parse_pagination, parse_limit, parse_offset, parse_non_negative, pagination_error) used by both the tasks list and runs list handlers.

Structs§

Pagination
Parsed pagination parameters.
PaginationError
Pagination parsing error.
PaginationErrorDetails
Structured pagination error details.
PaginationErrorResponse
Pagination error response payload.

Constants§

DEFAULT_LIMIT
Default limit for list pagination.
MAX_LIMIT
Maximum allowed limit for list pagination.

Functions§

pagination_error
Converts a pagination error into an HTTP 422 Unprocessable Entity response.
parse_limit
Parses and validates the limit parameter.
parse_non_negative
Parses a non-negative integer value from a query parameter string.
parse_offset
Parses and validates the offset parameter.
parse_pagination
Parses raw query string into validated pagination parameters.