class Nationality:
    Poland = 'PL'
Germany = 'DE'
France = 'FR'
Spain = 'ES'
nationalityDict = {}
for k, v in Nationality.__dict__.items():
    if not k.startswith('__'):
        nationalityDict[v] = k
Преобразователь перечислений в python