I'd like to deploy my code to a web server as a package. There Python is subprocessed and scripts are executed. These scripts use data files. But in case a file is needed and it doesn't exist, it should be created.
I intend to use
pkg_resources for managing those files inside the package, but it comes with limitations. There is no way of creating those resources.
One could, of course start manipulating path variables inside the package to get absolute references to files, but I'm looking for something a bit more convenient. Not the best of reasons to not use some method, but someone might actually know something I don't!
So, what is the best or current way of creating data files inside a package?
If it makes a difference, the files are directly under the sources that manipulate them. I'm new to packaging and releasing Python code, so any help is greatly appreciated! I'd also be open to changing the approach if that's what is needed to make this work.