from typing import Any

class _CommonFile:
    encoding: Any
    return_unicode: Any
    autosave: bool
    @classmethod
    def from_string(cls, data, **kwds): ...
    @classmethod
    def from_path(cls, path, **kwds): ...
    def __init__(
        self,
        path: Any | None = ...,
        new: bool = ...,
        autoload: bool = ...,
        autosave: bool = ...,
        encoding: str = ...,
        return_unicode=...,
    ) -> None: ...
    @property
    def path(self): ...
    @path.setter
    def path(self, value) -> None: ...
    @property
    def mtime(self): ...
    def load_if_changed(self): ...
    def load(self, path: Any | None = ..., force: bool = ...): ...
    def load_string(self, data) -> None: ...
    def save(self, path: Any | None = ...) -> None: ...
    def to_string(self): ...

class HtpasswdFile(_CommonFile):
    context: Any
    def __init__(self, path: Any | None = ..., default_scheme: Any | None = ..., context=..., **kwds) -> None: ...
    def users(self): ...
    def set_password(self, user, password): ...
    def update(self, user, password): ...
    def get_hash(self, user): ...
    def set_hash(self, user, hash): ...
    def find(self, user): ...
    def delete(self, user): ...
    def check_password(self, user, password): ...
    def verify(self, user, password): ...

class HtdigestFile(_CommonFile):
    default_realm: Any
    def __init__(self, path: Any | None = ..., default_realm: Any | None = ..., **kwds) -> None: ...
    def realms(self): ...
    def users(self, realm: Any | None = ...): ...
    def set_password(self, user, realm: Any | None = ..., password=...): ...
    def update(self, user, realm, password): ...
    def get_hash(self, user, realm: Any | None = ...): ...
    def set_hash(self, user, realm: Any | None = ..., hash=...): ...
    def find(self, user, realm): ...
    def delete(self, user, realm: Any | None = ...): ...
    def delete_realm(self, realm): ...
    def check_password(self, user, realm: Any | None = ..., password=...): ...
    def verify(self, user, realm, password): ...
