tiled.client.catalog.Catalog.sort

Catalog.sort(sorting)[source]

Make a Catalog with the same entries but sorted according to sorting.

Examples

Sort by “color” in ascending order, and then by “height” in descending order.

>>> from tiled.client import ASCENDING, DESCENDING
>>> catalog.sort([("color", ASCENDING), ("height", DESCENDING)])

Note that 1 may be used as a synonym for ASCENDING, and -1 may be used as a synonym for DESCENDING.