Use Time Optimal Trajectories as proposed by Kunz et al.
Use C++ library (https://github.com/tobiaskunz/trajectories) to create time optimal trajectories respecting velocity and acceleration constraints.
Shows how to integrate C++ code with cppimport (https://github.com/tbenthompson/cppimport)