You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there are two implementations for configurations for the files currently existing.
The first being the .env, and another type introduced by @Gremyo in the file private_keys.py.
The advantage of the module approach is that it keeps everything within python and requires no set-up script. The user simply takes the example_private_key.py file, replaces the place holder with their key, and removes the example_ part of the name. This means not having to mess with any environment variables.
I like environment variables from a devops standpoint.
It's easier to fine tune and set env-variables per instance when spawning them, than it is to automate the editing of a config file, yet alone a python script.
It is:
Hard to accidentally commit an ENV variable.
Easy to provide two liner copy-paste code in the setup portion of the readme that adds to your bashrc.
something that ties you to using linux.
Use of config.py
The idea of importing namespaces sounds interesting:
Within a config file you can even implement checks for whether or not you've set it. So as soon as the import happens, you can raise errors about it not being there. It's not a standard way of doing it.
Agnostic to OS
yaml
Seems to be the go-to for config files in most of the projects I've worked on in python.
Agnostic to OS
Currently there are two implementations for configurations for the files currently existing.
The first being the .env, and another type introduced by @Gremyo in the file
private_keys.py
.While my preference leans to the .env route, I've also found another route that was introduced by this project. https://github.com/nluedtke/brochat-bot
There needs to be talk on what the proper implementation should be.
The text was updated successfully, but these errors were encountered: