added redis adapter
Code Quality Pipeline / code-quality (pull_request) Failing after 42s
Test Python Package / test (pull_request) Failing after 1s

This commit is contained in:
Brian Bjarke Jensen
2025-09-14 15:45:19 +02:00
parent c789e33290
commit 1abcae4050
9 changed files with 289 additions and 3 deletions
@@ -0,0 +1,24 @@
"""Definition of ConnectionAwareInterface abstract base class."""
from __future__ import annotations
from abc import ABC, abstractmethod
class ContextAwareInterface(ABC):
"""Interface that defined context-related methods."""
@abstractmethod
def __enter__(self) -> ContextAwareInterface:
"""Enter the context."""
raise NotImplementedError()
@abstractmethod
def __exit__(
self,
exc_type: type | None,
exc_val: object | None,
exc_tb: object | None
) -> None:
"""Exit the context."""
raise NotImplementedError()