from Board import Board, Square from Console import Console from service import Service from validations import Validations user = Board('u') computer = Board('c') validations = Validations() service = Service(user, computer, validations) console = Console(service) ''' mysquare=Square() print(mysquare) ''' console.run()
user=conf['DBuser'], password=conf['DBpwd'], ) connection.autocommit = True return connection if __name__ == '__main__': # Read arguments and configurations and initialize args = ccloud_lib.parse_args() config_file = args.config_file topic = args.topic conf = ccloud_lib.read_ccloud_config(config_file) db_conf = read_db_config(DBConfig) v = Validations() conn = dbconnect(db_conf) # Create Consumer instance # 'auto.offset.reset=earliest' to start reading from the beginning of the # topic if no committed offsets exist consumer = Consumer({ 'bootstrap.servers': conf['bootstrap.servers'], 'sasl.mechanisms': conf['sasl.mechanisms'], 'security.protocol': conf['security.protocol'], 'sasl.username': conf['sasl.username'], 'sasl.password': conf['sasl.password'], 'group.id': 'sensor_readings_consumer', 'auto.offset.reset': 'earliest', })
def setUp(self): self.ship = 'A1A2A3' self.invalid_ship = 'A0A1A2' self.validations = Validations()