def InitDB(schema=None, callback=None, verify_or_create=True):
 assert (not hasattr(DBClient, '_instance')), 'instance already initialized'
 assert (schema is not None)
 if options.options.localdb:
  from local_client import LocalClient
  DBClient.SetInstance(LocalClient(schema, read_only=options.options.readonly_db))
 else:
  from dynamodb_client import DynamoDBClient
  DBClient._instance = DynamoDBClient(schema, read_only=options.options.readonly_db)
 if verify_or_create:
  schema.VerifyOrCreate(DBClient.Instance(), callback)
 else:
  callback([])

def InitDB ( schema = None , callback = None , verify_or_create = True ) : assert ( not hasattr ( DBClient , '_instance' ) ) , 'instance already initialized' assert ( schema is not None ) if options . options . localdb : from local_client import LocalClient DBClient . SetInstance ( LocalClient ( schema , read_only = options . options . readonly_db ) ) else : from dynamodb_client import DynamoDBClient DBClient . _instance = DynamoDBClient ( schema , read_only = options . options . readonly_db ) if verify_or_create : schema . VerifyOrCreate ( DBClient . Instance ( ) , callback ) else : callback ( [ ] )
sets the db client instance .