Buckets:

download
raw
635 Bytes
"""Serialize session."""
import abc
from collections.abc import Mapping
from typing import Any
class AbsractSessionSerializer(abc.ABC):
"""Session serializer base class"""
@abc.abstractmethod
def __init__(self, secret_key: str, max_age: int) -> None: ...
@abc.abstractmethod
def serialize(self, data: Mapping[str, Any]) -> bytes:
"""Serialize the session content to bytes in order to be saved."""
...
@abc.abstractmethod
def deserialize(self, data: bytes) -> tuple[Mapping[str, Any], bool]:
"""Derialize the session raw bytes content and return it as a mapping."""
...

Xet Storage Details

Size:
635 Bytes
·
Xet hash:
9e12f65fd2807fbfeeea810817e1d66385e0fa6e1dfc4f21ca782cd5d538fa3e

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.