build_credential_store (auth/wiring.py)

potpie · potpie/auth/wiring.py · python · Apache-2.0
auth

Builds production file-backed credential store via clean adapter pattern

# Source: https://github.com/potpie-ai/potpie | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""Potpie composition root for the authentication credential seam.

The auth/credential surface is interactive, inbound-adapter credential
acquisition. Its persistence contract is a Potpie-owned port
(:class:`~potpie.auth.ports.credentials.CredentialStore`). This module is the
one place that picks the concrete implementation, so inbound command code
depends on the port — never on an adapter.

The default is the file-backed store; tests inject an in-memory fake via
``commands/_common.set_store`` instead.
"""

from __future__ import annotations

from potpie.auth.ports.credentials import Cred

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key