Python Enum Module
Enumeration types — Enum, IntEnum, Flag, auto. This category documents 4 Python enum module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: enum.Enum(), enum.IntEnum(), enum.auto(), enum.Flag(). enum.Enum() creates an enumeration class with named constants. enum.IntEnum() an Enum that is also a subclass of int (members can be used as integers). enum.auto() automatically assigns integer values to enum members (starting from 1). enum.Flag() an Enum with bitwise operations for combining flags. For a structured walkthrough of the whole topic, read the Enum Module guide. Enum Module belongs to the Core Language group alongside Built-in Functions, Statements & Keywords, Typing Module, Dataclasses Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground.