chore: initialize containerized Python learning workbook (2026 DevOps/SRE)

This commit is contained in:
soda64 committed 2026-11-30 22:55:56 +01:00
commit ae4c421815
63 files changed
+1273

No files matched your search

@@ -0,0 +1,25 @@
from typing import Protocol
class KvStore(Protocol):
def get(self, key: str) -> str | None: ...
def set(self, key: str, value: str) -> None: ...
class InMemoryKvStore:
def __init__(self) -> None:
self._data: dict[str, str] = {}
def get(self, key: str) -> str | None:
raise NotImplementedError("Pobierz wartość lub None")
def set(self, key: str, value: str) -> None:
raise NotImplementedError("Zapisz wartość w słowniku")
class FeatureFlagService:
def __init__(self, store: KvStore) -> None:
self._store = store
def is_enabled(self, flag: str) -> bool:
raise NotImplementedError("Zwróć True jeśli wartość flagi to 'true' lub '1' (lowercase)")