Squash-merge lib-standardisation: adopt repo standards across packaging, tooling, docs, and CI. - standardize pyproject.toml (canonical packaging, lint config, extras, GSDFC pydoclint) - add py.typed marker, modernize type hints and Google-style docstrings - nest generated docs under docs/lib and docs/mcp; add hand-written wiki - adopt standard Type A PyPI CI pipeline (tag==version guard + quality gate) - promote generated CHANGELOG.md; bump version to 0.0.3
25 lines
638 B
Python
25 lines
638 B
Python
from collections.abc import Callable
|
|
from typing import Any, TypeVar
|
|
|
|
from .store import CredentialStore
|
|
|
|
T = TypeVar("T")
|
|
|
|
class RedisCredentialStore(CredentialStore[T]):
|
|
redis: Any
|
|
key: str
|
|
serialize: Callable[[T], bytes]
|
|
deserialize: Callable[[bytes], T]
|
|
ttl_seconds: int | None
|
|
def __init__(
|
|
self,
|
|
redis_client: Any,
|
|
key: str,
|
|
serialize: Callable[[T], bytes],
|
|
deserialize: Callable[[bytes], T],
|
|
ttl_seconds: int | None = ...,
|
|
) -> None: ...
|
|
def load(self) -> T | None: ...
|
|
def save(self, credentials: T) -> None: ...
|
|
def clear(self) -> None: ...
|