Python script to interpolate state variables

Is there open source python code that uses ArduPlane log data (e.g. POS messages) to interpolate state variables (position, altitude, attitude…) at a given time, e.g. the time a photo was taken? I realize that both MissionPlanner and QGroundControl provide this function through a GUI, but I would like to incorporate similar functionality into a command-line tool.