TriP is a python library designed to calculate the forward- and inverse-kinematics of rigid mechanisms. This includes open chains, closed chains, and even combinations of both. Baumgärtner et al., ...
The process is explained in the following blog: http://dagmarobotix.blogspot.pt/2016/09/6-dof-robotic-arm-modelation_81.html ...