How to define Python Enum properties if MySQL ENUM values have space in their names?

As Shenanigator stated in the comment of my question, we can use aliases to solve this problem.

Seniority = Enum(
    value='Seniority',
    names=[
        ('Intern', 'Intern'),

        ('Junior Engineer', 'Junior Engineer'),
        ('Junior_Engineer', 'Junior_Engineer'),

        ('Medior Engineer', 'Medior Engineer'),
        ('Medior_Engineer', 'Medior_Engineer'),

        ('Senior Engineer', 'Senior Engineer'),
        ('Senior_Engineer', 'Senior_Engineer')
    ]
)

A list is a lot of emblematic names (individuals) bound to one of a kind, steady qualities. Inside a specification, the individuals can be looked at by character, and the count itself can be iterated over.

Module Contents

This module characterizes four specification classes that can be utilized to characterize remarkable arrangements of names and qualities: Enum, IntEnum, Flag, and IntFlag. It likewise characterizes one decorator, one of a kind(), and one aide, auto.

class enum.Enum

Base class for making listed constants. See segment Functional API for an other development grammar.

class enum.IntEnum

Base class for making listed constants that are additionally subclasses of int.

class enum.IntFlag

Base class for making listed constants that can be consolidated utilizing the bitwise administrators without losing their IntFlag participation. IntFlag individuals are additionally subclasses of int.

class enum.Flag

Base class for making listed constants that can be consolidated utilizing the bitwise tasks without losing their Flag enrollment.

enum.unique()

Enum class decorator that guarantees just one name is bound to any one worth.

class enum.auto

Examples are supplanted with a suitable incentive for Enum individuals. Beginning worth beginnings at 1.

New in variant 3.6: Flag, IntFlag, a