{ "info": { "author": "Marcelo Moraes", "author_email": "marcelomoraesjr28@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "[![Build Status](https://travis-ci.org/marcelomoraes28/pyramid-auto-env.svg?branch=master)](https://travis-ci.org/marcelomoraes28/pyramid-auto-env)\n[![Coverage Status](https://coveralls.io/repos/github/marcelomoraes28/pyramid-auto-env/badge.svg?branch=auto_env)](https://coveralls.io/github/marcelomoraes28/pyramid-auto-env?branch=auto_env)\n[![Pypi Version](https://img.shields.io/badge/pypi-0.1.2-yellow.svg)](https://img.shields.io/badge/pypi-0.0.1--alpha-yellow.svg)\n[![Python Version](https://img.shields.io/badge/python-2.7%7C3.6-blue.svg)](https://img.shields.io/badge/python-2.7%7C3.6-blue.svg)\n\n# Pyramid auto env\nA pyramid library to help overwrite ini configs with environment variables.\n\n## Getting Started\n\nThese instructions will help you install library and use its features.\n\n### Installing\n\n```\npip install pyramid-auto-env\n```\n\n## Running the tests\nInstall test dependencies\n```\npip install -e \".[test]\"\n```\n\nRun test\n```\npytest\n```\n\n## Using\n\nReplacing the mail.password of the inifile with environment variable\n\n**INI FILE**\n```\n###\n# app configuration\n# https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html\n###\n\n[app:main]\nuse = egg:myproject\n\npyramid.reload_templates = true\npyramid.debug_authorization = false\npyramid.debug_notfound = false\npyramid.debug_routematch = false\npyramid.default_locale_name = en\npyramid.includes =\n pyramid_debugtoolbar\n\nmail.password = local\n\n# By default, the toolbar only appears for clients from IP addresses\n# '127.0.0.1' and '::1'.\n# debugtoolbar.hosts = 127.0.0.1 ::1\n\n###\n# wsgi server configuration\n###\n\n[server:main]\nuse = egg:waitress#main\nlisten = localhost:6543\n\n###\n# logging configuration\n# https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html\n###\n\n[loggers]\nkeys = root, pyramid_auto_env\n\n[handlers]\nkeys = console\n\n[formatters]\nkeys = generic\n\n[logger_root]\nlevel = INFO\nhandlers = console\n\n[logger_pyramid_auto_env]\nlevel = INFO\nhandlers = console\nqualname = pyramid_auto_env\npropagate = 0\n\n[handler_console]\nclass = StreamHandler\nargs = (sys.stderr,)\nlevel = NOTSET\nformatter = generic\n\n[formatter_generic]\nformat = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)s\n\n```\n\n**ENVIRONMENT**\n```\nexport MYPROJ_MAIL_PASSWORD = S3kr3t\n```\n**CODE**\n```python\nfrom pyramid.config import Configurator\nfrom pyramid_auto_env import get_env_or_ini\n\n@autoenv_settings(prefix='myproj')\ndef main(global_config, **settings):\n \"\"\" This function returns a Pyramid WSGI application.\n \"\"\"\n config = Configurator(settings=settings)\n config.include('pyramid_jinja2')\n config.add_static_view('static', 'static', cache_max_age=3600)\n config.add_route('home', '/')\n config.scan()\n return config.make_wsgi_app()\n\n```\n\n## ENVVAR Format\n\nThe environment variable lookup will search for `_`\n\n### Examples (prefix=MYPROJ):\n```\nhost.url -> MYPROJ_HOST_URL\nmail-smtp -> MYPROJ_MAIL_SMTP\nmy.project.super-secret -> MYPROJ_MY_PROJECT_SUPER_SECRET\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/marcelomoraes28/pyramid-auto-env", "keywords": "autoenv pyramid", "license": "", "maintainer": "", "maintainer_email": "", "name": "pyramid-auto-env", "package_url": "https://pypi.org/project/pyramid-auto-env/", "platform": "", "project_url": "https://pypi.org/project/pyramid-auto-env/", "project_urls": { "Homepage": "https://github.com/marcelomoraes28/pyramid-auto-env" }, "release_url": "https://pypi.org/project/pyramid-auto-env/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Pyramid Autoenv", "version": "0.1.2" }, "last_serial": 4703276, "releases": { "0.0.1a0": [ { "comment_text": "", "digests": { "md5": "0a65fba0c296ba4079f0a2681625c8e4", "sha256": "2cef0e0bba215fc1e884c682b2dcfec752eaeaa60162a267362b04a5dfdb9380" }, "downloads": -1, "filename": "pyramid_auto_env-0.0.1a0.tar.gz", "has_sig": false, "md5_digest": "0a65fba0c296ba4079f0a2681625c8e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2681, "upload_time": "2018-10-06T01:43:20", "url": "https://files.pythonhosted.org/packages/59/64/8f4bbd69103e2a01e30dd6b83696b79dec41015d53441cf078a3a9756448/pyramid_auto_env-0.0.1a0.tar.gz" } ], "0.0.2a0": [ { "comment_text": "", "digests": { "md5": "aaf8c888ee24a1583c9efe2436ba7e3a", "sha256": "49a1423f1c5e8adc9bc364ab3955537fd3210b44b43bbff3883ef3508d623040" }, "downloads": -1, "filename": "pyramid_auto_env-0.0.2a0.tar.gz", "has_sig": false, "md5_digest": "aaf8c888ee24a1583c9efe2436ba7e3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3533, "upload_time": "2018-10-06T19:57:55", "url": "https://files.pythonhosted.org/packages/ae/99/feb5a24d9e0b0557363656b83706dac02867db967810eb56c62d766ccdb8/pyramid_auto_env-0.0.2a0.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "a793477225e4942c629d02a449a61bc1", "sha256": "8d08f34939592cb5444a67de0b5f86f055601d4ee37d7db6469a3aff31557332" }, "downloads": -1, "filename": "pyramid_auto_env-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a793477225e4942c629d02a449a61bc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3523, "upload_time": "2018-10-06T20:27:38", "url": "https://files.pythonhosted.org/packages/c6/9c/67fccca1a637147516db25bec8b8db45605d8119900296879134f1202451/pyramid_auto_env-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "f7f602f3cfbe89eb22007343b3cbf87a", "sha256": "9745a57d10baefd51daa0a66c2078f072f0b1fd3f633a723824b7f9433237180" }, "downloads": -1, "filename": "pyramid_auto_env-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f7f602f3cfbe89eb22007343b3cbf87a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3528, "upload_time": "2018-10-06T20:33:25", "url": "https://files.pythonhosted.org/packages/24/34/e55888bc3126b179b3b2d9cb32129f0da65361dc232589c904209895210f/pyramid_auto_env-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "9a5c86c6caebd2c0dfa448e9241ce7ce", "sha256": "c19406e04e9444aa7e6da045428546cf58d7cbcad30bd6c6fa4d8c522b3a3803" }, "downloads": -1, "filename": "pyramid_auto_env-0.1.2.tar.gz", "has_sig": false, "md5_digest": "9a5c86c6caebd2c0dfa448e9241ce7ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3595, "upload_time": "2019-01-16T13:02:52", "url": "https://files.pythonhosted.org/packages/8a/d7/934b6091d4c565b9c526a485eb1145fa8d24357711ed8a0028dc9fd5c5ae/pyramid_auto_env-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9a5c86c6caebd2c0dfa448e9241ce7ce", "sha256": "c19406e04e9444aa7e6da045428546cf58d7cbcad30bd6c6fa4d8c522b3a3803" }, "downloads": -1, "filename": "pyramid_auto_env-0.1.2.tar.gz", "has_sig": false, "md5_digest": "9a5c86c6caebd2c0dfa448e9241ce7ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3595, "upload_time": "2019-01-16T13:02:52", "url": "https://files.pythonhosted.org/packages/8a/d7/934b6091d4c565b9c526a485eb1145fa8d24357711ed8a0028dc9fd5c5ae/pyramid_auto_env-0.1.2.tar.gz" } ] }