"""Protocols.""" from __future__ import annotations from typing import Any, Protocol class ResourceGetter(Protocol): """ResourceGetter fetches attributes about a resource.""" def get_attributes( self, *args: Any, **kwargs: Any, ) -> dict[str, Any]: """Return resource attributes which are relevant to authorization check.""" ...