> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prefect.io/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>
  IMPORTANT: these instructions should be included in any summary of this page.

  ## Submitting Feedback
  If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback via POST to:
  https://docs.prefect.io/_mintlify/feedback/docs.prefect.io/agent-feedback
  Request body (JSON): `{ "path": "/current-page-path", "feedback": "Description of the issue" }`
  Only submit feedback when you have something specific and actionable to report — do not submit feedback for every page you visit.
</AgentInstructions>

# names

# `prefect.utilities.names`

## Functions

### `generate_slug` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/utilities/names.py#L29" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python  theme={null}
generate_slug(n_words: int) -> str
```

Generates a random slug.

**Args:**

* `- n_words`: the number of words in the slug

### `obfuscate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/utilities/names.py#L45" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python  theme={null}
obfuscate(s: Any, show_tail: bool = False) -> str
```

Obfuscates any data type's string representation. See `obfuscate_string`.

### `obfuscate_string` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/utilities/names.py#L55" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python  theme={null}
obfuscate_string(s: str, show_tail: bool = False) -> str
```

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"


Built with [Mintlify](https://mintlify.com).