import types
from datetime import timedelta

from .timer import Timer as Timer

class StatsClientBase:
    def close(self) -> None: ...
    def pipeline(self) -> PipelineBase: ...
    def timer(self, stat: str, rate: int = 1) -> Timer: ...
    def timing(self, stat: str, delta: float | timedelta, rate: int = 1) -> None: ...
    def incr(self, stat: str, count: int = 1, rate: int = 1) -> None: ...
    def decr(self, stat: str, count: int = 1, rate: int = 1) -> None: ...
    def gauge(self, stat: str, value, rate: int = 1, delta: bool = False) -> None: ...
    def set(self, stat: str, value, rate: int = 1) -> None: ...

class PipelineBase(StatsClientBase):
    def __init__(self, client: StatsClientBase) -> None: ...
    def __enter__(self) -> PipelineBase: ...
    def __exit__(self, typ: type[BaseException] | None, value: BaseException | None, tb: types.TracebackType | None) -> None: ...
    def send(self) -> None: ...
    def pipeline(self) -> PipelineBase: ...
