Skip to content

ADR-0001 — Zero Snowflake dependency at import time

Status: accepted Date: 2026-05-31

Context

pinky-core must be importable in every context where Python runs: CI pipelines, local dev scripts, UDF handlers inside Snowflake, and Streamlit in Snowflake apps. Importing Snowpark unconditionally raises an error or adds startup cost in contexts that don't have a live session.

Decision

No module in pinky-core imports Snowflake or Snowpark at the module level. Optional deps (email-validator, phonenumbers, python-stdnum, croniter) are imported lazily inside functions. Type-check-only imports use TYPE_CHECKING guard.

Consequences

  • pinky-core is installable on any Python 3.11+ environment without a Snowflake client — pip install pinky-core works in pure CI.
  • Any module that needs a live session belongs in pinky-snowpark, not here.
  • Runtime errors from missing optional deps surface at call time, not at import time.