yera.creds.locking

Cross-process locking for protected credential stores.

Symbols

class SecretStoreLock — Coordinate access to one credential store across processes.

SecretStoreLock

Coordinate access to one credential store across processes.

Methods

__enter__ — Acquire the store lock.
__exit__ — Release the store lock.

SecretStoreLock.__enter__

__enter__() → Self

Acquire 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,
) → None

Release the store lock.