{ "info": { "author": "Michael JasonSmith", "author_email": "mpj17@onlinegroups.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Zope2", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=============\r\n``gs.config``\r\n=============\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nConfiguration files with \"sets\"\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n:Authors: `Richard Waid`_; `Michael JasonSmith`_\r\n:Contact: Michael JasonSmith \r\n:Date: 2015-03-17\r\n:Organization: `GroupServer.org`_\r\n:Copyright: This document is licensed under a\r\n `Creative Commons Attribution-Share Alike 4.0 International License`_\r\n by `OnlineGroups.net`_.\r\n\r\nIntroduction\r\n============\r\n\r\nSometimes configuration is complex, such as when multiple sets of\r\nconfiguration is needed because multiple instances of a system\r\n(such as GroupServer [#gs]_) are running on the same setup. In\r\nthis case each instance is made up of a set of components, and\r\neach component is made up of configuration options:\r\n\r\n* Instance\r\n\r\n + Component\r\n \r\n - Configuration options\r\n - More configuration options\r\n\r\n + Component 2\r\n\r\n - Different configuration options\r\n\r\n* Another instance\r\n\r\nSadly the ConfigParser_ system does not allow for this hierarchy,\r\nbut ``gs.config`` does, by using the *name* *space* to provide\r\nthe relationship between an instance and the component. In\r\nparticular, this product supplies a `Config class`_ to read a\r\nfile_ of a particular structure.\r\n\r\n``Config`` Class\r\n================\r\n\r\nThe ``gs.config.Config`` class that represents the system\r\nconfiguration. See the Sphinx documentation in this module for\r\nmore information.\r\n\r\nFile\r\n====\r\n\r\nThe instance is marked with the name ``[config-${name}]``, where\r\n``${name}`` is the name of the instance. For example ``[config-production]``\r\nfor the instance ``production``.\r\n\r\nFor each component the set of sections is then supplied::\r\n\r\n [config-production]\r\n database = production\r\n smtp = external\r\n cache = production\r\n tokenauth = production\r\n \r\nThe configuration for a component can be shared by multiple\r\ninstances::\r\n\r\n [config-staging]\r\n database = production\r\n smtp = dead\r\n cache = none\r\n tokenauth = production\r\n\r\nEach component is a configuration section, with a name of the form\r\n``[${component}-${name}]``. For example ``[smtp-external]`` for the \r\nsmtp section named *external*.\r\n\r\nExample\r\n-------\r\n\r\nIn the example below three instances are configured: one for a\r\ntest-server, one for a staging server, and one for a production\r\nserver. Each instance has two components: a database, and an SMTP\r\nserver::\r\n\r\n [config-test]\r\n database = test\r\n smtp = test\r\n\r\n [config-staging]\r\n database = live\r\n smtp = test\r\n\r\n [config-production]\r\n database = live\r\n smtp = live\r\n\r\n # An actual configuration section for each configuration set\r\n [database-test]\r\n dsn = postgres://name:pass@server/database-test\r\n\r\n [database-live]\r\n dsn = postgres://name:pass@server/database-live\r\n\r\n [smtp-test]\r\n server = localhost\r\n port = 2525\r\n\r\n [smtp-live]\r\n server = external\r\n port = 25\r\n\r\nWhen the configuration is instantiated, an ID is passed. This ID identifies\r\nthe configuration set that is currently being accessed. If an ID is not\r\npassed, an attempt is made to get the ID from the environment\r\nautomatically. At the moment this is specific to the GroupServer_\r\nenvironment, though care is taken to ensure that it will fall back\r\ngracefully to being passed an ID.\r\n\r\nResources\r\n=========\r\n\r\n- Documentation: http://groupserver.readthedocs.org/projects/gsconfig\r\n- Code repository: https://github.com/groupserver/gs.config\r\n- Questions and comments to\r\n http://groupserver.org/groups/development\r\n- Report bugs at https://redmine.iopen.net/projects/groupserver\r\n\r\n.. [#gs] While originally written for GroupServer_, there is no\r\n code in this product that is specific to\r\n GroupServer. However, this product is used to configure\r\n the database_, SMTP_, cache_, and `token\r\n authentication`_ for GroupServer.\r\n.. _database: https://github.com/groupserver/gs.database\r\n.. _SMTP: https://github.com/groupserver/gs.email\r\n.. _cache: https://github.com/groupserver/gs.cache\r\n.. _token authentication: https://github.com/groupserver/gs.auth.token\r\n\r\n.. _GroupServer: http://groupserver.org/\r\n.. _GroupServer.org: http://groupserver.org/\r\n.. _OnlineGroups.Net: https://onlinegroups.net\r\n.. _ConfigParser: http://docs.python.org/library/configparser.html\r\n.. _Creative Commons Attribution-Share Alike 4.0 International License:\r\n http://creativecommons.org/licenses/by-sa/4.0/\r\n.. _Richard Waid: http://groupserver.org/p/richard\r\n.. _Michael JasonSmith: http://groupserver.org/p/mpj17", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://source.iopen.net/groupserver/gs.config/", "keywords": "groupserver,config,configuration,settings", "license": "ZPL 2.1", "maintainer": "", "maintainer_email": "", "name": "gs.config", "package_url": "https://pypi.org/project/gs.config/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/gs.config/", "project_urls": { "Homepage": "https://source.iopen.net/groupserver/gs.config/" }, "release_url": "https://pypi.org/project/gs.config/2.1.2/", "requires_dist": null, "requires_python": null, "summary": "Core GS config.", "version": "2.1.2" }, "last_serial": 1962169, "releases": { "2.1.1": [ { "comment_text": "", "digests": { "md5": "2d5952ed3ca0e3be82aa189d3986b078", "sha256": "93fd5811afb3fb89f4af70e996098b95442fcb4977e05cc7e3f8f01c1f073511" }, "downloads": -1, "filename": "gs.config-2.1.1.zip", "has_sig": false, "md5_digest": "2d5952ed3ca0e3be82aa189d3986b078", "packagetype": "bdist_egg", "python_version": "any", "requires_python": null, "size": 26608, "upload_time": "2014-05-06T16:08:15", "url": "https://files.pythonhosted.org/packages/b9/f3/b84ef3cb46359184107d7b6e259ce110f4bf9682bde7b84fc6785fd214c2/gs.config-2.1.1.zip" } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "8cfe1411ee42960372f76a7e3e0b8bae", "sha256": "1bba953ff938d7adcf6ac28d9854aeb8cb5450ae0435111e83ac272838c3fc76" }, "downloads": -1, "filename": "gs.config-2.1.2.zip", "has_sig": false, "md5_digest": "8cfe1411ee42960372f76a7e3e0b8bae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27090, "upload_time": "2014-07-02T20:58:08", "url": "https://files.pythonhosted.org/packages/11/bd/0a39fca32c495aa2025e694f1e9a605784019d198518a233bf13d35efe65/gs.config-2.1.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8cfe1411ee42960372f76a7e3e0b8bae", "sha256": "1bba953ff938d7adcf6ac28d9854aeb8cb5450ae0435111e83ac272838c3fc76" }, "downloads": -1, "filename": "gs.config-2.1.2.zip", "has_sig": false, "md5_digest": "8cfe1411ee42960372f76a7e3e0b8bae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27090, "upload_time": "2014-07-02T20:58:08", "url": "https://files.pythonhosted.org/packages/11/bd/0a39fca32c495aa2025e694f1e9a605784019d198518a233bf13d35efe65/gs.config-2.1.2.zip" } ] }