MAVproxy on RPI with sensors

I’m testing a payload using a ClockworkPi uConsole. I will be adding a serial GPS, IMU and magnetic compass over I2C to log position and orientation data along with the payload’s data. Is there a pre-built library that I can use for generating MAVLINK messages from the PI CM as if it were connected to a flight controller? I’d like to work with real data, not simulated.