faker_enum is a provider for the Faker Python package.
Faker enum provides the ability to generate enum values based on an enum type.
from enum import Enum
from faker import Faker
from faker_enum import EnumProvider
fake = Faker()
fake.add_provider(EnumProvider)
class Color(Enum):
RED = 1
GREEN = 2
BLUE = 3
fake.enum(Color)
# One of [Color.RED, Color.GREEN, Color.BLUE]