Last active
April 12, 2017 15:37
-
-
Save pior/b1d181802fac750f0cc1 to your computer and use it in GitHub Desktop.
Keep your deployment secrets out of your PasterDeploy configuration using Environment Variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from pyramid.config import Configurator | |
def main(global_config, **settings): | |
settings = {k: os.path.expandvars(v) for k, v in settings.items()} | |
config = Configurator(settings=settings) | |
config.include(__name__) | |
return config.make_wsgi_app() | |
def includeme(config): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to http://stackoverflow.com/questions/16435274/in-the-pyramid-web-framework-how-do-i-source-sensitive-settings-into-developmen/16446566#16446566