paper-dynasty-database/app/routers_v2
Cal Corum f471354e39 feat: persistent browser instance for card rendering (#89)
Replace per-request Chromium launch/teardown with a module-level
persistent browser. get_browser() lazy-initializes with is_connected()
auto-reconnect; shutdown_browser() is wired into FastAPI lifespan for
clean teardown. Pages are created per-request and closed in a finally
block to prevent leaks.

Also fixed pre-existing ruff errors in staged files (E402 noqa comments,
F541 f-string prefix removal, F841 unused variable rename) that were
blocking the pre-commit hook.

Closes #89

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 11:20:42 -05:00
..
__init__.py Initial Commit with /current 2023-09-13 14:44:26 -05:00
admin.py fix: remove plaintext bearer token from warning logs (#7) 2026-03-05 03:43:27 +00:00
awards.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
batstats.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
battingcardratings.py fix: remove plaintext bearer token from warning logs (#7) 2026-03-05 03:43:27 +00:00
battingcards.py fix: remove plaintext bearer token from warning logs (#7) 2026-03-05 03:43:27 +00:00
cardpositions.py fix: remove plaintext bearer token from warning logs (#7) 2026-03-05 03:43:27 +00:00
cards.py fix: batch Paperdex lookups to avoid N+1 queries (#17) 2026-03-07 01:37:03 -06:00
cardsets.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
current.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
decisions.py fix: remove plaintext bearer token from warning logs (#7) 2026-03-05 03:43:27 +00:00
events.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
evolution.py feat: Track Catalog API endpoints (WP-06) (#71) 2026-03-12 20:40:38 -05:00
gamerewards.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
gauntletrewards.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
gauntletruns.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
mlbplayers.py fix: remove plaintext bearer token from warning logs (#7) 2026-03-05 03:43:27 +00:00
notifications.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
packs.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
packtypes.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
paperdex.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
pitchingcardratings.py fix: remove plaintext bearer token from warning logs (#7) 2026-03-05 03:43:27 +00:00
pitchingcards.py fix: remove plaintext bearer token from warning logs (#7) 2026-03-05 03:43:27 +00:00
pitstats.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
players.py feat: persistent browser instance for card rendering (#89) 2026-03-16 11:20:42 -05:00
rarity.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
results.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
rewards.py fix: replace broad except Exception blocks with DoesNotExist (#15) 2026-03-05 15:32:53 -06:00
scout_claims.py feat: add scout_opportunities and scout_claims tables and API endpoints (#44) 2026-03-05 03:45:38 +00:00
scout_opportunities.py feat: add scout_opportunities and scout_claims tables and API endpoints (#44) 2026-03-05 03:45:38 +00:00
scouting.py fix: remove stub live_update_pitching endpoint (#11) 2026-03-07 01:37:52 -06:00
stratgame.py fix: remove plaintext bearer token from warning logs (#7) 2026-03-05 03:43:27 +00:00
stratplays.py fix: remove plaintext bearer token from warning logs (#7) 2026-03-05 03:43:27 +00:00
teams.py Merge pull request 'fix: use max() for pitcher OPS split weighting (#6)' (#60) from ai/paper-dynasty-database#6 into next-release 2026-03-10 14:42:59 +00:00