from typing import Any, Generic, TypeVar

from django.contrib.sessions.backends.base import SessionBase
from django.contrib.sessions.base_session import AbstractBaseSession
from django.utils.functional import cached_property

_ST = TypeVar("_ST", bound=AbstractBaseSession, default=AbstractBaseSession)

class SessionStore(SessionBase, Generic[_ST]):
    def __init__(self, session_key: str | None = None) -> None: ...
    @classmethod
    def get_model_class(cls) -> type[_ST]: ...
    @cached_property
    def model(self) -> type[_ST]: ...
    def create_model_instance(self, data: dict[str, Any]) -> _ST: ...
    async def acreate_model_instance(self, data: dict[str, Any]) -> _ST: ...
