import os import datetime import random import mattermostdriver random.seed( os.urandom( 8 ) ) def generate_incident_number(): return datetime.datetime.now().strftime( "%Y%m%d" ) + ( "%4d" % int( random.random() * 10000 ) ) class Mattermost( object ): def __init__( self, *args, **kwargs ): self.mm = mattermostdriver.Driver( kwargs ) self.mm.login()