Tiziano Fiorenzani, an Italian engineer now working in the US, has one of the best YouTube channels on using open source drone software, especially, APM, Dronekit and Python. Above is just one example, on Drone Delivery with Python:
We are going to write a script that connects with the vehicle and waits for the operator to upload a valid mission. Then the script adds our current location as final waypoint and the vahicle is commanded to arm and takeoff. The vehicle is then set to Auto and once the final waypoint is reached, the script deletes the mission and sets the vehicle in Return to launch mode. At the end the script resets its status and is ready for new adventures!
See the rest of his videos on his YouTube channel here.