Raspberry(uart) to Pixhawk Mavlink

hi.we need that we compose pyton codes for uart to pixhawk.this pyton code sent gps cordinate to pixhawk for waypoint.
How can we sent gps coordinates through uart from raspberry pi to pixhawk?

MAVLink or Mavros, following this : https://dev.px4.io/en/companion_computer/pixhawk_companion.html