I have done this and it's pretty easy. Although I would avoid the APM because it's locked to older firmware. But it should work fine because the dronekit is using plain ole mav commands to the flight controller.
I used the GPIO pins coming out of the telem port on APM or Pixhawk. You can use USB as well) On the pi you setup a mavproxy through whatever llink you are using (for GPIO most likely is is AMA0 and USB probably USB0?). Once that mavproxy.py is running you should be able to send mavlink commands to the APM. That's the simplest way to make sure it's working.
Now for dronekit the mavproxy is spawned from the methods in your python script.