Reference book: quantlib python cookbook
By the cookbook, most of the functions, such as time value calculation, pricing on derivatives and other fixed income calculation, are showed in Python code.
Here is the questions, the cookbook can only used as an example for each function. The details on defining the functions and the key values used for the function have to be found in the quanlib official website, where the examples are in C++.
I test the way to use Tensorflow instead of using numpy or python to make calculations or do Monte Carlo calculation, unfortunately, the calculation speed are not improved too much.