from .dt import as_local as as_local, utcnow as utcnow
from _typeshed import Incomplete
from collections.abc import Callable as Callable, Iterable, KeysView
from datetime import timedelta
from typing import Any, TypeVar

_T = TypeVar('_T')
_U = TypeVar('_U')
RE_SANITIZE_FILENAME: Incomplete
RE_SANITIZE_PATH: Incomplete

def raise_if_invalid_filename(filename: str) -> None: ...
def raise_if_invalid_path(path: str) -> None: ...
def slugify(text: str | None, *, separator: str = '_') -> str: ...
def repr_helper(inp: Any) -> str: ...
def convert(value: _T | None, to_type: Callable[[_T], _U], default: _U | None = None) -> _U | None: ...
def ensure_unique_string(preferred_string: str, current_strings: Iterable[str] | KeysView[str]) -> str: ...
def get_random_string(length: int = 10) -> str: ...

class Throttle:
    min_time: Incomplete
    limit_no_throttle: Incomplete
    def __init__(self, min_time: timedelta, limit_no_throttle: timedelta | None = None) -> None: ...
    def __call__(self, method: Callable) -> Callable: ...
