]defget_connection():# create connection use firstEP in taos.cfg.returntaos.connect()defcreate_database(conn):# the default precision is ms (microsecond), but we use us(microsecond) here.conn.execute("CREATE DATABASE test precision 'us'")conn.execute("USE test")definsert_lines(conn):affected_rows=conn.schemaless_insert(lines,SmlProtocol.LINE_PROTOCOL,SmlPrecision.MICRO_SECONDS)print(affected_rows)# 8if__name__=='__main__':connection=get_connection()try:create_database(connection)insert_lines(connection)finally:connection.close()