from _typeshed import Incomplete
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: Incomplete | 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: Incomplete | None = ..., force: bool = ...): ...
    def load_string(self, data) -> None: ...
    def save(self, path: Incomplete | None = ...) -> None: ...
    def to_string(self): ...

class HtpasswdFile(_CommonFile):
    context: Any
    def __init__(self, path: Incomplete | None = ..., default_scheme: Incomplete | 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: Incomplete | None = ..., default_realm: Incomplete | None = ..., **kwds) -> None: ...
    def realms(self): ...
    def users(self, realm: Incomplete | None = ...): ...
    def set_password(self, user, realm: Incomplete | None = ..., password=...): ...
    def update(self, user, realm, password): ...
    def get_hash(self, user, realm: Incomplete | None = ...): ...
    def set_hash(self, user, realm: Incomplete | None = ..., hash=...): ...
    def find(self, user, realm): ...
    def delete(self, user, realm: Incomplete | None = ...): ...
    def delete_realm(self, realm): ...
    def check_password(self, user, realm: Incomplete | None = ..., password=...): ...
    def verify(self, user, realm, password): ...
