Connection

class Connection

This singleton is used to connect motor to your database. When initialising your application call Connection.connect() and all subsequent operations on the database will be automatically done by the documents.

classmethod connect(host='localhost', port=27017, database='motorturbine')

Connects motorturbine to your database

Parameters:
  • host (str) – optional (‘localhost’)
  • port (int) – optional (27017)
  • database (str) – optional (‘motorturbine’)