HistoryCursor

class gafaelfawr.models.history.HistoryCursor(time, id, previous=False)

Bases: object

Pagination cursor for history entries.

Parameters:

Attributes Summary

previous

Whether to search backwards instead of forwards.

Methods Summary

from_str(cursor)

Build cursor from the string serialization form.

invert(cursor)

Return the inverted cursor (going the opposite direction).

Attributes Documentation

previous: bool = False

Whether to search backwards instead of forwards.

Methods Documentation

classmethod from_str(cursor)

Build cursor from the string serialization form.

Parameters:

cursor (str) – Serialized form of the cursor.

Returns:

The cursor represented as an object.

Return type:

HistoryCursor

Raises:

InvalidCursorError – Raised if the cursor is not valid.

classmethod invert(cursor)

Return the inverted cursor (going the opposite direction).

Parameters:

cursor (HistoryCursor) – Cursor to invert.

Returns:

The inverted cursor.

Return type:

HistoryCursor