Skip to content

Instantly share code, notes, and snippets.

@merwok
Forked from pior/pyramid_main.py
Created April 12, 2017 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save merwok/c3f0540707eccdf44c4d5126ddd63209 to your computer and use it in GitHub Desktop.
Save merwok/c3f0540707eccdf44c4d5126ddd63209 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment