pypaginate.engine.cursor_codec
Cursor value encoding/decoding for keyset pagination.
Encodes ORDER BY column values into URL-safe base64 strings. No external dependencies — uses stdlib json + base64.
Functions
|
Decode a cursor string back to a values tuple. |
|
Encode cursor values to a URL-safe string. |
Module Contents
- pypaginate.engine.cursor_codec.decode_cursor(cursor: str) tuple[Any, Ellipsis]
Decode a cursor string back to a values tuple.
- Raises:
ValidationError – If the cursor is malformed or tampered with.