yera.creds.locking
Cross-process locking for protected credential stores.
Symbols
SecretStoreLock
Coordinate access to one credential store across processes.
Methods
SecretStoreLock.__init__
__init__(
path: Path,
timeout: float = 0,
) → NoneCreate a lock for one credential store.
Parameters
path
type: Path
Stable lock-file path beside the credential store.
timeout
type: float = 0
Seconds to wait before reporting contention.
SecretStoreLock.__enter__
__enter__() → SelfAcquire the store lock.
Returns
type: Self
The acquired lock.
Raises
SecretStoreBusyError
If the lock cannot be acquired in time.
SecretStoreUnsafeError
If the lock path is unsafe.
SecretStoreLock.__exit__
__exit__(
exception_type: type[BaseException] | None,
exception: BaseException | None,
traceback: TracebackType | None,
) → NoneRelease the store lock.
Parameters
exception_type
type: type[BaseException] | None
Type of exception leaving the context, if any.
exception
type: BaseException | None
Exception leaving the context, if any.
traceback
type: TracebackType | None
Traceback associated with the exception, if any.