first commit

This commit is contained in:
long2ice
2020-08-26 18:04:57 +08:00
commit c20bb73f27
20 changed files with 1484 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import abc
from typing import Tuple
class Backend:
@abc.abstractmethod
async def get_with_ttl(self, key: str) -> Tuple[int, str]:
raise NotImplementedError
@abc.abstractmethod
async def get(self, key: str) -> str:
raise NotImplementedError
@abc.abstractmethod
async def set(self, key: str, value: str, expire: int = None):
raise NotImplementedError