Reputation: 1819
I have a python package which build some particular text file, and save it on a bucket on google storage.
The access keys of google storage are a parameter of my program which are defined in a file config.py, but these keys should not be given to other people and every user is expected to fill the file with its own access keys.
My question is: how am I supposed to distribute this package to my colleagues, so they can modify the config.py with their own google storage access after having pip installed the package.
In other words, what is the natural way to allow a package to be installed via pip install in a way that the user have to generate the config file before using the package.
I could do the stdin and stdout with the user myself like the first program I did in python but I would be really surprised if no package exists to handle such interactions properly?
Upvotes: 1
Views: 60
Reputation: 7616
I would think you would implement some kind of initialization routine that allows them to pass in the values, assuming this is a module they might import and use.
If it is a package that they run from the command line, like python -m SimpleHTTPServer
then you just could probably add some arguments to specify a key file.
You could generate a config file in their home directory if it doesn't exist and give them a note to update it if it hasn't been updated yet (and then exit).
Upvotes: 1