nbclient

A client library for executing notebooks. Formally nbconvert’s ExecutePrepr..

Here are some articles that you may find helpful