-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow parameterizing via env vars #164
Comments
Is this actually already possible? Looks as though we are using Lines 187 to 210 in e7d4237
|
I did confirm that this works fine. The only snag I ran into was sourcing my Example of Code, assuming from pipestat import PipestatManager
from dotenv import load_dotenv
load_dotenv()
psm1=PipestatManager()
psm1.report(values={"number_of_things":3}) |
Here I have an example of some code that allows a database-backed Python object to be parameterized either via constructor, or via ENV vars:
https://github.com/refgenie/seqcolapi/blob/fa889f818e1858573cb261077fd737af905178af/seqcolapi/scconf.py#L79-L94
I have found this convenient, because to use it I just do something like:
Then
which is quite nice, and also cloud-friendly. I have found myself wanting to do this with pipestat. Would it be possible to make the constructor work like this so it can be configured via ENV vars?
I know it's a little different since there's a pipestat config file, and there's nothing like that here.
I wonder if
priority_get
could help;https://github.com/databio/yacman/blob/5db6323a6469347abfa16a590fc8b48d21b7b16f/yacman/yacman_future.py#L358-L389
The text was updated successfully, but these errors were encountered: