def from_session_token(cls, token):
     user = participants.select().where(
         participants.c.session_token == token,
     ).where(
         participants.c.is_suspicious.isnot(True),
     ).execute().fetchone()
     return cls(user)
 def from_id(cls, participant_id):
     user = participants.select().where(
         participants.c.id == participant_id,
     ).where(
         participants.c.is_suspicious.isnot(True),
     ).execute().fetchone()
     session = dict(user)
     session['session_token'] = uuid.uuid4().hex
     participants.update().where(
         participants.c.id == participant_id
     ).values(
         session_token = session['session_token'],
     ).execute()
     return cls(session)