scolby33 / OCSPdash

A dashboard for the status of the top certificate authorities' OCSP responders.
MIT License
1 stars 0 forks source link

OCSPscrape config improvements #39

Open scolby33 opened 6 years ago

scolby33 commented 6 years ago

Config files? Env variables?

cthoyt commented 6 years ago

Will maybe use https://github.com/mbr/flask-appconfig

scolby33 commented 6 years ago

The shear number of flask-* things you add to this project is amazing.

cthoyt commented 6 years ago

Nope flask-appconfig is defunct

cthoyt commented 6 years ago

i changed my mind. Keyword arguments in the create_application functions or environment variables or bust

scolby33 commented 6 years ago

I'm confused

Hey how about def myfunction(kwarg1=whatever, magic_thing=whatever) and some inspection of os.env to autoextract f'{ENVPREFIX}_KWARG1' and f'{ENVPREFIX}_MAGIC_THING'?

cthoyt commented 6 years ago

Yeah this is the idea of namespacing within envionrment variables. Click actually does this for you in their CLI

scolby33 commented 6 years ago

It looks like it works basically the way I wrote up there except it uses '%s_%s' % (...) instead of f strings.

cthoyt commented 6 years ago

So is this done? I've decided never ever to use config files again until i find a library that basically does all of the searching for you (the same way that all of flake8, mypy, etc. are able to look in setup.cfg and also their specific files, but i don't want to write that code myself)

scolby33 commented 6 years ago

We wrote most of that code for pushover_complete, I think.

You should write the library.

cthoyt commented 6 years ago

Okay. Maybe build on this https://github.com/poudel/simple-config

cthoyt commented 6 years ago

There’s this new repo called easy_config I think we should use