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: Union[str, None], *, separator: str = ...) -> str: ...
def repr_helper(inp: Any) -> str: ...
def convert(value: Union[_T, None], to_type: Callable[[_T], _U], default: Union[_U, None] = ...) -> Union[_U, None]: ...
def ensure_unique_string(preferred_string: str, current_strings: Union[Iterable[str], KeysView[str]]) -> str: ...
def get_random_string(length: int = ...) -> str: ...

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