Skip to main content

prefect.utilities.names

Functions

generate_slug

Generates a random slug. Args:
  • - n_words: the number of words in the slug

obfuscate

Obfuscates any data type’s string representation. See obfuscate_string.

obfuscate_string

Obfuscates a string by returning a new string of 8 characters. If the input string is longer than 10 characters and show_tail is True, then up to 4 of its final characters will become final characters of the obfuscated string; all other characters are ”*”. “abc” -> "" “abcdefgh” -> "" “abcdefghijk” -> “*******k” “abcdefghijklmnopqrs” -> “****pqrs”