-
Notifications
You must be signed in to change notification settings - Fork 0
Enumerations
adasThePrime edited this page Apr 11, 2026
·
1 revision
The Pyahoo library defines various Enumeration (Enum) classes to enforce type safety and gurantee valid inputs for endpoints.
For convenience, every REST-based enum in this library natively inherits from str and Enum (effectively a "String Enum").
from pyahoo.enums import *Because the enums are subclassed from str, they serialize to their underlying string values automatically. This means you do not need to call .value to exctract the string.
Unlike the REST counterparts which are string-based, the WebSocket streaming payloads utilize Integer Enums mapped directly from Yahoo's protobuf messages.