Files
searxng/searx/shared/shared_abstract.py
T

23 lines
477 B
Python
Raw Normal View History

2021-01-05 11:22:48 +01:00
# SPDX-License-Identifier: AGPL-3.0-or-later
# pyright: strict
2021-01-11 18:44:39 +01:00
from abc import ABC, abstractmethod
from typing import Optional
2021-01-05 11:22:48 +01:00
2021-01-11 18:44:39 +01:00
class SharedDict(ABC):
@abstractmethod
def get_int(self, key: str) -> Optional[int]:
2021-01-05 11:22:48 +01:00
pass
2021-01-11 18:44:39 +01:00
@abstractmethod
def set_int(self, key: str, value: int):
2021-01-05 11:22:48 +01:00
pass
2021-01-11 18:44:39 +01:00
@abstractmethod
def get_str(self, key: str) -> Optional[str]:
2021-01-05 11:22:48 +01:00
pass
2021-01-11 18:44:39 +01:00
@abstractmethod
def set_str(self, key: str, value: str):
2021-01-05 11:22:48 +01:00
pass