aiohttp-security/demo/dictionary_auth/users.py

11 lines
271 B
Python
Raw Permalink Normal View History

from collections import namedtuple
User = namedtuple('User', ['username', 'password', 'permissions'])
user_map = {
user.username: user for user in [
User('devin', 'password', ('public',)),
User('jack', 'password', ('public', 'protected',)),
]
}