why the usage of venv / virtualenv?
then you can set up an environment and get scribus to point to it and cleanly access all libraries it needs for running the scripts.
you can add a requirements.txt to your script and anybody who gets them can run your script without having to perform special tricks.
that should work in a similar way as in most python IDEs, where you can (create or) pick a venv.
(iirc) right now -- at least on linux -- you can achieve the same effect by starting scribus from terminal with an activated venv.
that's really cool, but i can't expect the users of my scripts to do the same.
and as i've already had the chance to write in the past, i don't like the idea of messing around with the xml in the .sla files. there are a few reasons for that.
in short: directly editing a .sla is ok to solve a specific sudden problem. but i would not build a long term business on top of it.
(mainly: you get a fragile solution and since your solution is not general or even portable, it does not improve the scribus ecosystem)
(on top of it: several have tried in the past and the scribus generator is the only effort that somehow succeeded; still, i think i've demonstrated that it's possible to implement it in scribus itself and -- at the same time -- make scribus a better place; it makes me a bit sad to see how much work that has been put into the generator... but the scribus project is also at fault there.)