Files
django-stubs/django/contrib/sessions/backends/db.pyi
Maxim Kurnikov a9f215bf64 initial commit
2018-07-29 18:12:23 +03:00

29 lines
987 B
Python

from datetime import datetime
from django.contrib.sessions.base_session import AbstractBaseSession
from django.contrib.sessions.models import Session
from typing import (
Dict,
Optional,
Type,
Union,
)
class SessionStore:
def __init__(self, session_key: Optional[str] = ...) -> None: ...
def _get_session_from_db(self) -> Optional[AbstractBaseSession]: ...
@classmethod
def clear_expired(cls) -> None: ...
def create(self) -> None: ...
def create_model_instance(
self,
data: Dict[str, Union[int, str, datetime]]
) -> AbstractBaseSession: ...
def delete(self, session_key: Optional[str] = ...) -> None: ...
def exists(self, session_key: Optional[str]) -> bool: ...
@classmethod
def get_model_class(cls) -> Type[Session]: ...
def load(self) -> Dict[str, Union[str, int]]: ...
@cached_property
def model(self) -> Type[AbstractBaseSession]: ...
def save(self, must_create: bool = ...) -> None: ...