Application Programming Interface

Models

High Level

class powertrain.models.Project(**kwargs)

TODO: Documentation for Project

class powertrain.models.User(**kwargs)

TODO: Documentation for User

confirm(token)

Confirm User.email is valid and the actual human has access to this account.

Parameters:token (str) – Confirmation token. Generated with generate_confirmation_token
generate_confirmation_token(expiration=86400)

Generate a token used to confirm email addresses

Parameters:expiration (int) – Time (seconds) after which token doesn’t work
generate_reset_token(expiration=86400)

Generate a token for resetting a password

Parameters:expiration (int) – Time (seconds) after which token doesn’t work
reset_password(token, new_password)

Reset a password when given a proper token.

Handling matching passwords is done elsewhere.

Parameters:
  • token (str) – Generated with User.generate_reset_token
  • new_password (str) – New password
verify_password(password)

Returns True when incoming password matches hashed version

Within Projects

class powertrain.models.MRSession(**kwargs)

TODO: Documentation for MRSession

class powertrain.models.Configuration(**kwargs)

TODO: Documentation for Configuration

class powertrain.models.Task(**kwargs)

TODO: Documentation for Task

class powertrain.models.TaskSetup(**kwargs)

TODO: Documentation for TaskSetup

class powertrain.models.TaskTeardown(**kwargs)

TODO: Documentation for TaskTeardown

Within MRSessions

class powertrain.models.Scan(**kwargs)

TODO: Documentation for Scan

class powertrain.models.RawBehavior(**kwargs)

TODO: Documentation for RawBehavior

class powertrain.models.DerivedImage(**kwargs)

TODO: Documentation for DerivedImage

class powertrain.models.RawImage(**kwargs)

TODO: Documentation for RawImage

class powertrain.models.RawRender(**kwargs)

TODO: Documentation for RawRender

class powertrain.models.DerivedRender(**kwargs)

TODO: Documentation for DerivedRender

class powertrain.models.Job(**kwargs)

TODO: Documentation for Job

class powertrain.models.ExecutionUnit(**kwargs)

TODO: Documentation for ExecutionUnit

class powertrain.models.JobSetup(**kwargs)

TODO: Documentation for JobSetup

class powertrain.models.JobTeardown(**kwargs)

TODO: Documentation for JobTeardown