{ "info": { "author": "Shekhar Tiwatne", "author_email": "pythonic@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3" ], "description": ".. contents::\n.. sectnum::\n\n\nWhat is it?\n-----------\n\nIf you are a Python developer who likes to keep application configuration in simple Python modules and that your app have some default settings and production/dev/test setting files, **converge** can help you merge settings and load desired application settings.\n\n.. raw:: html\n\n \n \n\nGetting started\n----------------\n\nEasy to use\n~~~~~~~~~~~~\n\n.. code:: bash\n\n default_settings.py\n -------------------\n SERVER_PORT = 8000\n DOMAIN = 'example.com'\n ADMIN_EMAIL = 'admin@example.com'\n\n dev_settings.py\n ---------------\n SERVER_PORT = 9000\n\n \n.. code:: python\n\n import settings\n print(settings.SERVER_PORT) # 9000\n print(settings.DOMAIN) # example.com\n print(settings.get('VAR_THAT_DOESNT_EXIST')) # None\n\n\nInstall\n~~~~~~~\n\n.. code:: bash\n\n pip install converge\n\n.convergerc\n------------\n\n.convergerc file helps converge choose application mode and in turn load correct settings file. \n\nSupported directives\n~~~~~~~~~~~~~~~~~~~~\n\n_All directives are optional._\n\n**APP_MODE**\n\nValid values are\n\n- prod\n- dev\n- test \n- staging\n- beta\n\nBased on ``mode`` appropriate settings module would be used (if available)\n\n**SETTINGS_DIR**\n\nIf your settings files are in different directory, use SETTINGS_DIR to point converge to correct path. \n\n.. note:: Remember to drop __init__.py in settings directory.\n\n\n**GIT_SETTINGS_REPO**\n\nFetching application settings from a git repository is supported too. If such configuration is specified, git repository is cloned into `SETTINGS_DIR`.\n\n**GIT_SETTINGS_SUBDIR**\n\nIn case you \n- use same git repository to host configurations of more than one applications and\n- say settings files are in different subdirectories\n\nExample\n\n::\n\n my-git-repo/\n |\n |- myapp1\n | |\n | |- default_settings.py\n | |- prod_settings.py\n |\n |\n |- myapp2\n\n::\n\n cat .convergerc\n\n SETTINGS_DIR = 'appsettings'\n GIT_SETTINGS_REPO = 'git@github.com:shon/converge-test-settings.git'\n GIT_SETTINGS_SUBDIR = 'myapp1'\n\nIn this case all \\*_settings.py files in myapp1/ would be copied to appsettings.\n\n\n**Example**\n\n::\n\n .convergerc\n -----------\n\n APP_MODE = 'test'\n SETTINGS_DIR = 'settings'\n GIT_SETTINGS_REPO = 'git@github.com:shon/converge-test-settings.git'\n GIT_SETTINGS_SUBDIR = 'myapp1'\n\n\nSupported settings files\n-------------------------\n\n- Defaults: default_settings.py\n\n- Mode\n - production: prod_settings.py\n - development: dev_settings.py\n - test: test_settings.py\n - staging: staging_settings.py\n - beta: beta_settings.py\n\n- Deployment specific: site_settings.py\n\n\nGuidelines\n-----------\n\nSettings files are usual Python files that can contain valid python code however here are some guidelines for user\n\n- Use module variables for global application wide configuration\n- Use UPPERCASE while naming settings variables\n- For values prefer basic python datatypes such as string, integer,\n tuples\n- eg. ``SERVER_PORT = 1234``\n- Avoid complex python operations\n- Use simple classes for config sections\n .. code:: python\n\n class DB:\n HOST = 'db.example.com'\n PORT = 1234\n\n- Use simple string operations to avoid repetition\n .. code:: python\n\n BASE_DOMAIN = 'example.com'\n API_URL = 'api.' + BASE_DOMAIN``\n\nOverriding settings\n-------------------\n\nDefining module veriables in site_settings.py\n\nExample\n~~~~~~~\n\n**default_settings.py**\n\n``SERVER_PORT = 9999``\n\n**site_settings.py**\n\n``SERVER_PORT = 8888``\n\nOverriding partial settings\n---------------------------\n\nExample:\n\n**default_settings.py**\n\n.. code:: python\n\n class DB:\n HOST = 'db.example.com'\n PORT = 1234\n\n**site_settings.py**\n\n.. code:: python\n\n DB.PORT = 1111\n\n(Slightly) Advanced usage\n---------------------------\nIn case if you want to keep all settings.py files in a directory. Use `SETTINGS_DIR` directive in .convergerc file.\n\nExample\n~~~~~~~\n\n\n.. code:: bash\n \n >> cat .convergerc\n \n APP_MODE = 'prod'\n SETTINGS_DIR = 'settings/fat_server'\n\nThis is useful when you have to deploy multiple instances of an app with different configs\n\n::\n\n `-- settings/\n |\n |-- server1/\n | |\n | |--default_settings.py\n | |--prod_settings.py\n |\n |-- server2/\n | |--default_settings.py\n | |--prod_settings.py\n |\n |\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/converge/", "keywords": "", "license": "http://www.opensource.org/licenses/mit-license.php", "maintainer": "", "maintainer_email": "", "name": "converge", "package_url": "https://pypi.org/project/converge/", "platform": "", "project_url": "https://pypi.org/project/converge/", "project_urls": { "Homepage": "http://pypi.python.org/pypi/converge/" }, "release_url": "https://pypi.org/project/converge/0.9.8/", "requires_dist": null, "requires_python": "", "summary": "Ultra simple settings management for (only) Python apps", "version": "0.9.8" }, "last_serial": 4141246, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "53e2a15df83b9b7244fcfb4514dcd12b", "sha256": "02ee83255555340f0651b839ad72b5b2711e77a0500fa6922a2a6485d5656b5c" }, "downloads": -1, "filename": "converge-0.1.tar.gz", "has_sig": false, "md5_digest": "53e2a15df83b9b7244fcfb4514dcd12b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2369, "upload_time": "2016-11-12T12:19:56", "url": "https://files.pythonhosted.org/packages/26/c8/71817f568f6cde5b90c9f27c1bce5c07e6bcc6de8d2b8e06eaa7fe301060/converge-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "1bb3200f45505c689736cd6c435df050", "sha256": "108d40c162721e59164bd7838f68789cb1e9a0e4d34663c37c8989eb68047289" }, "downloads": -1, "filename": "converge-0.2.tar.gz", "has_sig": false, "md5_digest": "1bb3200f45505c689736cd6c435df050", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2583, "upload_time": "2016-11-12T12:58:23", "url": "https://files.pythonhosted.org/packages/34/cb/a2c25a1bd831760729944fad1354cc04a50b0bc7d877ff6c5bb3df68f9a1/converge-0.2.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "4a8aa5e2c55b4c465d8d507d0dc330c4", "sha256": "ab6253885d6640bee09a136e393838ee14050ac33c87757526f3da10049307dc" }, "downloads": -1, "filename": "converge-0.5.tar.gz", "has_sig": false, "md5_digest": "4a8aa5e2c55b4c465d8d507d0dc330c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3221, "upload_time": "2017-01-07T18:27:24", "url": "https://files.pythonhosted.org/packages/d2/02/988e410bfa7b603581c169395678751290d182fd9d58ce3f6140be449cef/converge-0.5.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "4d9d6ec88571da9ecbf2e04d6febd4fe", "sha256": "79fdacdbcd3166f08b4045890ed3b15f65ed6f8df27c04dd1782279be0c1da3f" }, "downloads": -1, "filename": "converge-0.7.tar.gz", "has_sig": false, "md5_digest": "4d9d6ec88571da9ecbf2e04d6febd4fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3809, "upload_time": "2017-01-12T18:59:00", "url": "https://files.pythonhosted.org/packages/61/88/d98b0406df6495d4b12d2b1ad691c40f6a47acc861b73b0fef1b4fd98557/converge-0.7.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "db7bb1867857691f9e1412b578142d76", "sha256": "896ea603563bdbe13acd0828d1c01b5e85e22c32d9bd3088aafff7c7c33f84a9" }, "downloads": -1, "filename": "converge-0.9.tar.gz", "has_sig": false, "md5_digest": "db7bb1867857691f9e1412b578142d76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4513, "upload_time": "2017-10-21T13:17:18", "url": "https://files.pythonhosted.org/packages/55/33/f792004201ce798ab9aa01724ec16c73e0168e14acd1d09da362b9c58cf4/converge-0.9.tar.gz" } ], "0.9.5": [ { "comment_text": "", "digests": { "md5": "e0487baf94ee831be2cd082be5478677", "sha256": "f9b5ea7e28008ade200880574778d83a581d0005e53398447d79d054f479e4ae" }, "downloads": -1, "filename": "converge-0.9.5.tar.gz", "has_sig": false, "md5_digest": "e0487baf94ee831be2cd082be5478677", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4640, "upload_time": "2017-12-26T12:47:50", "url": "https://files.pythonhosted.org/packages/50/48/d4263a7dbd82b2eb54ff7b9221aba3a8936d324411edf530ce8f9f4032ab/converge-0.9.5.tar.gz" } ], "0.9.6": [ { "comment_text": "", "digests": { "md5": "bdd7582f1f115ecef2fc89fbccb01320", "sha256": "362975cd8600df68b39f988c5afd3b79b58c5518229e4cb07c825ff6833eba93" }, "downloads": -1, "filename": "converge-0.9.6.tar.gz", "has_sig": false, "md5_digest": "bdd7582f1f115ecef2fc89fbccb01320", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4649, "upload_time": "2017-12-27T07:54:35", "url": "https://files.pythonhosted.org/packages/81/f3/b958c37c5e407912cbf25f9e16ec84d834fbace20ae1367469a21c5cea01/converge-0.9.6.tar.gz" } ], "0.9.7": [ { "comment_text": "", "digests": { "md5": "763038c3b7d272fcedeb308b6eb6cf60", "sha256": "b2f0f167a5a573e064e3bc7ae9a900198a82f4b5d9bdb89fb70388a98c78585a" }, "downloads": -1, "filename": "converge-0.9.7.tar.gz", "has_sig": false, "md5_digest": "763038c3b7d272fcedeb308b6eb6cf60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4795, "upload_time": "2018-03-06T14:49:26", "url": "https://files.pythonhosted.org/packages/e2/3b/90f73791c4ffa4d7fe52be3afe987435077a4ed8dc7e3fde4221ade2ae05/converge-0.9.7.tar.gz" } ], "0.9.8": [ { "comment_text": "", "digests": { "md5": "94b1a62cc0ffb4d0b1aa380d2ab6e079", "sha256": "767de64c67d6bee1acef8e99666196a2fa27b009ed1179c1f466aa277f39838d" }, "downloads": -1, "filename": "converge-0.9.8.tar.gz", "has_sig": false, "md5_digest": "94b1a62cc0ffb4d0b1aa380d2ab6e079", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4794, "upload_time": "2018-08-06T17:39:01", "url": "https://files.pythonhosted.org/packages/7b/65/3156a00c89fe94b1b93144577c3bafbd24b327037f92cd60f646162a3191/converge-0.9.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "94b1a62cc0ffb4d0b1aa380d2ab6e079", "sha256": "767de64c67d6bee1acef8e99666196a2fa27b009ed1179c1f466aa277f39838d" }, "downloads": -1, "filename": "converge-0.9.8.tar.gz", "has_sig": false, "md5_digest": "94b1a62cc0ffb4d0b1aa380d2ab6e079", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4794, "upload_time": "2018-08-06T17:39:01", "url": "https://files.pythonhosted.org/packages/7b/65/3156a00c89fe94b1b93144577c3bafbd24b327037f92cd60f646162a3191/converge-0.9.8.tar.gz" } ] }