Registry /
devops / fantasy-hockey-notifier-cdk
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
FantasyHockeyNotifier
✓ from fantasy_hockey_notifier_cdk import FantasyHockeyNotifier
✗ from fantasy-hockey-notifier-cdk import FantasyHockeyNotifier
Hyphens not allowed in Python imports; use underscores.
FantasyHockeyNotifierProps
✓ from fantasy_hockey_notifier_cdk import FantasyHockeyNotifierProps
Props interface for configuring the construct.
Minimal CDK app that deploys the notifier construct. Set environment variables LEAGUE_ID, ESPN_S2, SWID before deploying.
from aws_cdk import App, Stack
from fantasy_hockey_notifier_cdk import FantasyHockeyNotifier, FantasyHockeyNotifierProps
import os
app = App()
stack = Stack(app, 'FantasyHockeyNotifierStack')
# Configuration - use environment variables or Secrets Manager
props = FantasyHockeyNotifierProps(
league_id=int(os.environ.get('LEAGUE_ID', '0')),
espn_s2=os.environ.get('ESPN_S2', ''),
swid=os.environ.get('SWID', ''),
email_notification='user@example.com',
sms_notification='+1234567890',
)
FantasyHockeyNotifier(stack, 'FantasyHockeyNotifier', props)
app.synth()
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'fantasy_hockey_notifier_cdk'
The package is installed with hyphens but imported with underscores; common mistake.
fixUse correct import: from fantasy_hockey_notifier_cdk import FantasyHockeyNotifier
TypeError: __init__() got an unexpected keyword argument 'espn'
Version 2.x changed the props structure; 'espn' nested object is no longer accepted.
fixPass espn_s2 and swid directly as top-level properties.
ValueError: League ID must be an integer
LEAGUE_ID environment variable is missing or not a valid integer.
fixSet LEAGUE_ID to the numeric league ID from ESPN. Example: export LEAGUE_ID=123456
Upgrade
Version history
2.0.68latest on PyPI · released May 19, 2026
Audit
Dependencies
aws-cdk-librequiredCore CDK library required for constructs
constructsrequiredBase constructs library
boto3requiredAWS SDK for sending notifications via SNS