Skip to content

Instantly share code, notes, and snippets.

@pior
Last active April 12, 2017 15:37
Show Gist options
  • Save pior/b1d181802fac750f0cc1 to your computer and use it in GitHub Desktop.
Save pior/b1d181802fac750f0cc1 to your computer and use it in GitHub Desktop.
Keep your deployment secrets out of your PasterDeploy configuration using Environment Variables
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
@merwok
Copy link

merwok commented Mar 31, 2015

C’est beau.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment