prefect.server.utilities.names
This module is deprecated. Use prefect.utilities.names
instead.
generate_slug(n_words)
Generates a random slug.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
-
|
n_words (int
|
the number of words in the slug |
required |
Source code in src/prefect/utilities/names.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
obfuscate(s, show_tail=False)
Obfuscates any data type's string representation. See obfuscate_string
.
Source code in src/prefect/utilities/names.py
45 46 47 48 49 50 51 52 |
|
obfuscate_string(s, show_tail=False)
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"
Source code in src/prefect/utilities/names.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|