Partner Credentials
Local development
Run, debug, and test Partner Credentials locally
Prerequisites
uvand Python 3.13.- GCP credentials with access to Spanner and Secret Manager.
- Partner credentials present in Secret Manager.
Required environment
export SPANNER_INSTANCE_ID="..."
export SPANNER_DATABASE_ID="..."Optional environment
export GCP_PROJECT_ID="..."
export DEBUG="true"
export SENTRY_ENVIRONMENT="development"Google Application Credentials
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"Install dependencies
# From repo root
uv sync --all-packagesRun locally
# From repo root
uv run --package partnercreds granian --interface asgi services.partnercreds.main:app --host 0.0.0.0 --port 8080 --workers 1 --loop uvloopSanity checks
curl http://localhost:8080/api/v1/healthExample request
curl "http://localhost:8080/api/v1/auth/pims/token?oid=ORG_ID"Tests
# From repo root
uv run --package partnercreds pytest -qDebugging tips
404means the organization id is missing or not found in Spanner.500often indicates missing Secret Manager entries or partner API failures.
Last updated on