{ "info": { "author": "makoto tsuyuki", "author_email": "mtsuyuki@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "glueplate\n========================================================\n\nconfig framework\n\n.. image:: https://travis-ci.org/tsuyukimakoto/glueplate.svg?branch=master\n :target: https://travis-ci.org/tsuyukimakoto/glueplate\n\n.. image:: https://codecov.io/gh/tsuyukimakoto/glueplate/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/tsuyukimakoto/glueplate\n\n.. image:: https://pyup.io/repos/github/tsuyukimakoto/glueplate/shield.svg\n :target: https://pyup.io/repos/github/tsuyukimakoto/glueplate/\n\n.. image:: https://pyup.io/repos/github/tsuyukimakoto/glueplate/python-3-shield.svg\n :target: https://pyup.io/repos/github/tsuyukimakoto/glueplate/\n\n.. image:: https://codebeat.co/badges/bb625f2e-572a-410f-9019-08006aac86cf\n :target: https://codebeat.co/projects/github-com-tsuyukimakoto-glueplate-master\n\nWhat is Config framework?\n------------------------------------------------------\n\nYour framework or library might need default settings and you want your user to change them.\n\nMany developer wrote this kind of code, and you are going to. GluePlate is it!\n\nFeatures\n------------------------------------------------------\n\nEasy to write - Merge\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou and your user write easiry.\n\nJust import Glue as _ and write like nested dict.\n\n::\n\n from glueplate import Glue as _\n\n\n settings = _(\n GLUE_PLATE_ENVIRONMENT_VARIABLE_KEY = 'BASEPACKAGE_SETTINGS_MODULE',\n from_base = 'comming from base',\n to_be_override = 'I am base.',\n )\n\nglueplate import variable named `settings` from os.environ['GLUE_PLATE_BASE_MODULE'], this is a base settings.\n\nThen glueplate looks settings.GLUE_PLATE_ENVIRONMENT_VARIABLE_KEY and import variable named `settings` from os.environ[settings.GLUE_PLATE_ENVIRONMENT_VARIABLE_KEY], this is a user customized settings. Customized settings needs only user needs override, or addition.\n\n::\n\n from glueplate import Glue as _\n\n\n settings = _(\n from_sub='comming from sub',\n to_be_override = 'I am sub.',\n )\n\nThey are merged and easy to use.\n\n::\n\n from glueplate import config\n\n assert('I am sub' == config.settings.to_be_override)\n assert('comming from base' == config.settings.from_base)\n assert('comming from sub' == config.settings.from_sub)\n\nAppend to list\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou may not want to override by you user, just add user's additional data.\n\nglueplate provide special keyword prefix to append original settings variable.\n\n- GLUE_PLATE_PLUS_BEFORE\\_\n\n User can append list before.\n ::\n \n # base\n settings = _(\n list1 = [1,2,3],\n )\n\n # user customized\n settings = _(\n GLUE_PLATE_PLUS_BEFORE_list1 = [5,4]\n )\n\n # config.settings.list1 == [5, 4, 1, 2, 3]\n\n- GLUE_PLATE_PLUS_AFTER\\_\n\n Same as GLUE_PLATE_PLUS_BEFORE\\_ but append to backward.\n ::\n\n # base\n settings = _(\n list1 = [1,2,3],\n )\n\n # user customized\n settings = _(\n GLUE_PLATE_PLUS_AFTER_list1 = [5,4]\n )\n\n # config.settings.list1 == [1, 2, 3, 5, 4]\n\nInherit other glueplate\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou might use library using glueplate. Environment variable `GLUE_PLATE_BASE_MODULE` is only one on your process.\n\nYour base settings can indecate library's gluplate settings module.\n\n- GLUE_PLATE_PARENT_MODULES\n\n Specify library's gluplate settings module names as list.\n ::\n\n from glueplate import Glue as _\n\n\n settings = _(\n GLUE_PLATE_PARENT_MODULES=[\n 'parentpackage1.parentpackage1_settings',\n 'parentpackage2.parentpackage2_settings'\n ]\n )", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tsuyukimakoto/glueplate", "keywords": "settings config framework", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "glueplate", "package_url": "https://pypi.org/project/glueplate/", "platform": "", "project_url": "https://pypi.org/project/glueplate/", "project_urls": { "Homepage": "https://github.com/tsuyukimakoto/glueplate" }, "release_url": "https://pypi.org/project/glueplate/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "Settings framework for framework or library.", "version": "1.0.2" }, "last_serial": 4371522, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "9de47d3eb09d6cc2456cb2d963f5d390", "sha256": "d73314300c44839094bef6e19471e6d1489ac6a8c7b9a7eb23a5406592f29362" }, "downloads": -1, "filename": "glueplate-1.0.tar.gz", "has_sig": false, "md5_digest": "9de47d3eb09d6cc2456cb2d963f5d390", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3056, "upload_time": "2016-09-25T16:47:44", "url": "https://files.pythonhosted.org/packages/3f/c7/326989859504fceeccf658318d745122a6e26ab5c4a8d440fc47dfef1781/glueplate-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "29c9f1e364ae2410e4ed386d316d5360", "sha256": "afbf1a8ef281ea17bf097c933d4f8047abbfbf7e7995345eadddd2bb4e39f8bb" }, "downloads": -1, "filename": "glueplate-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "29c9f1e364ae2410e4ed386d316d5360", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5699, "upload_time": "2017-05-21T04:07:16", "url": "https://files.pythonhosted.org/packages/27/84/a27f2d8e3a286e973a828edd98e1e7ed0ea03bca9a3b72fa7e8fcd7cf087/glueplate-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cd72001e3774912d0996c5d18c503dce", "sha256": "29bdf7539707b29adcdd378bb812bd80f7df0a6202422ec532942e3c65f870e2" }, "downloads": -1, "filename": "glueplate-1.0.1.tar.gz", "has_sig": false, "md5_digest": "cd72001e3774912d0996c5d18c503dce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3363, "upload_time": "2017-05-21T04:07:18", "url": "https://files.pythonhosted.org/packages/f2/56/6565759d5a91beb09a7eb4451483a48187514ac21766b69025aa715b6a7d/glueplate-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "830059ec7a545511653a2c31eb0a5761", "sha256": "2ef3671130b00ff732483efbdbc161b9ff52c2b0df76be2c2212c7e3cc1751ff" }, "downloads": -1, "filename": "glueplate-1.0.2.tar.gz", "has_sig": false, "md5_digest": "830059ec7a545511653a2c31eb0a5761", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3588, "upload_time": "2018-10-13T10:21:16", "url": "https://files.pythonhosted.org/packages/2b/bd/4ba658af55a7ed9f2569aeb36fcea25f6c9e89cb81a4d0c264953a37b1b8/glueplate-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "830059ec7a545511653a2c31eb0a5761", "sha256": "2ef3671130b00ff732483efbdbc161b9ff52c2b0df76be2c2212c7e3cc1751ff" }, "downloads": -1, "filename": "glueplate-1.0.2.tar.gz", "has_sig": false, "md5_digest": "830059ec7a545511653a2c31eb0a5761", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3588, "upload_time": "2018-10-13T10:21:16", "url": "https://files.pythonhosted.org/packages/2b/bd/4ba658af55a7ed9f2569aeb36fcea25f6c9e89cb81a4d0c264953a37b1b8/glueplate-1.0.2.tar.gz" } ] }