Accessing sen2cor scene classification from Python


I would like to include sen2cor scene classification in my own processing chain in Python. I could run the command line interface L2A_Process with some arguments through subprocess and try to interpret the output. But it would be much better to have it all happen within my Python session.

I guess I could build config like it is done in L2A_Process and then feed that to L2A_SceneClass, doing without all of L2A_ProcessTile and L2A_Schedule.

I can see that it is easy to generate tables from config:

self.tables = L2A_Tables(self.config)

Is this possible/feasbile or are there obvious pitfalls that I am not seeing?