posty.util module
Various utility functions
-
posty.util.bucket(_list: list[T], size: int) → list[list[T]][source]
Bucket the list _list into chunks of up to size size
Example:
bucket([1,2,3,4,5], 2) -> [[1,2], [3,4], [5]]
-
posty.util.slugify(text: str) → str[source]
Returns a slugified version of the given text
-
posty.util.slugify_posty1(text: str) → str[source]
Returns a Posty 1.x compatible slugified version of text