7 ms·
Or API_KEY = os.environ.get("YOUTUBE_API_KEY") CHANNEL_ID = os.environ.get("YOUTUBE_CHANNEL_ID") assert(API_KEY, "Missing YOUTUBE_API_KEY") assert(CHA
by stana 1y ago
Or
API_KEY = os.environ.get("YOUTUBE_API_KEY")
CHANNEL_ID = os.environ.get("YOUTUBE_CHANNEL_ID")
assert(API_KEY, "Missing YOUTUBE_API_KEY")
assert(CHANNEL_ID, "Missing CHANNEL_ID")
- Tempest1981 1y agoDo you use parens with assert? In Python, the assert statement is not a function, right? That bit me before... it created a tuple which evaluated as true.
- IshKebab 1y agoAssertions are disabled via `python -O` so they probably shouldn't be used like this.