MCPcopy Index your code
hub / github.com/tiny-pilot/tinypilot / _user_from_strings

Function _user_from_strings

app/auth.py:78–81  ·  view source on GitHub ↗

Reinstates a User object from string values (e.g., as of the DB).

(username, role, credentials_last_changed)

Source from the content-addressed store, hash-verified

76
77
78def _user_from_strings(username, role, credentials_last_changed):
79 """Reinstates a User object from string values (e.g., as of the DB)."""
80 return User(username, Role[role],
81 datetime.datetime.fromisoformat(credentials_last_changed))
82
83
84def register(username, password, role):

Callers 2

get_accountFunction · 0.85
get_all_accountsFunction · 0.85

Calls 1

UserClass · 0.85

Tested by

no test coverage detected