This repository has been archived on 2023-10-10. You can view files and clone it, but cannot push or open issues or pull requests.
paste/paste/utils.py

18 lines
326 B
Python
Executable file

# ruff: noqa: S311
"""Shared utils function."""
import random
import string
from paste import config
def generate_id() -> str:
"""
Generate url id format.
:return: Url id.
"""
return "".join(
random.choices(string.ascii_letters + string.digits,
k=config.URL_LENGTH)
)