Skip to content

feat(config)!: load settings lazily via get_settings()#24

Merged
himewel merged 3 commits into
mainfrom
feat/lazy-pydantic-settings
May 23, 2026
Merged

feat(config)!: load settings lazily via get_settings()#24
himewel merged 3 commits into
mainfrom
feat/lazy-pydantic-settings

Conversation

@himewel

@himewel himewel commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace import-time GP_ACCESS_TOKEN snapshot with memoized get_settings() so env and .env changes are picked up after cache_clear().
  • Add extra="ignore" to Settings so shared .env files with Q2GOOGLE_* variables no longer fail validation.
  • Bump version to 0.0.9 (breaking for code that imported GP_ACCESS_TOKEN directly).

Test plan

  • uv run gopro-api search --start 2026-01-01 --end 2026-01-02 with GP_ACCESS_TOKEN in .env
  • Construct GoProAPI() / AsyncGoProAPI() without access_token and confirm token resolves from env
  • Place Q2GOOGLE_STATE_URI=... in .env alongside GP_ACCESS_TOKEN and confirm import no longer raises

Made with Cursor

himewel and others added 3 commits May 23, 2026 18:40
Replace import-time GP_ACCESS_TOKEN snapshot with memoized get_settings()
and ignore unknown env keys so shared .env files with Q2GOOGLE_* vars work.

Co-authored-by: Cursor <cursoragent@cursor.com>
The action expects type_labels.breaking, not breaking_change.

Co-authored-by: Cursor <cursoragent@cursor.com>
@himewel himewel merged commit 919053d into main May 23, 2026
5 checks passed
@himewel himewel deleted the feat/lazy-pydantic-settings branch May 23, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant